Forked from Captain Anonymous's Pen pJZxbV.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var browserSync = require('browser-sync'); | |
| var del = require('del'); | |
| var gulp = require('gulp'); | |
| var pageSpeed = require('psi'); | |
| var plugins = require('gulp-load-plugins')(); | |
| var runSequence = require('run-sequence'); | |
| // Optimize images | |
| gulp.task('images', function () { | |
| return gulp.src('app"<%= asset_path('$1') %>"**/*') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isObject(obj) { | |
| return obj === Object(obj); | |
| } | |
| isObject([1, 2, 3, 4]); // true | |
| isObject([]); // true | |
| isObject(['Hello!']); // true | |
| isObject({ a: 1 }); // true | |
| isObject({}); // true | |
| isObject(true); // false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const debounce = (fn, ms = 0) => { | |
| let timeoutId; | |
| return function(...args) { | |
| clearTimeout(timeoutId); | |
| timeoutId = setTimeout( | |
| () => fn.apply(this, args), | |
| ms | |
| ); | |
| }; | |
| }; |
OlderNewer