Travis build: 1653 [cron]
This commit is contained in:
20
dist/_30s.es5.js
vendored
20
dist/_30s.es5.js
vendored
@ -362,16 +362,20 @@ var curry = function curry(fn) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var debounce = function debounce(fn) {
|
var debounce = function debounce(fn) {
|
||||||
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
var ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||||||
|
|
||||||
var inDebounce = void 0;
|
var timeoutId = void 0;
|
||||||
return function () {
|
return function () {
|
||||||
var context = this,
|
var _this = this;
|
||||||
args = arguments;
|
|
||||||
clearTimeout(inDebounce);
|
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||||
inDebounce = setTimeout(function () {
|
args[_key] = arguments[_key];
|
||||||
return fn.apply(context, args);
|
}
|
||||||
}, wait);
|
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
timeoutId = setTimeout(function () {
|
||||||
|
return fn.apply(_this, args);
|
||||||
|
}, ms);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
dist/_30s.es5.min.js
vendored
2
dist/_30s.es5.min.js
vendored
File diff suppressed because one or more lines are too long
12
dist/_30s.esm.js
vendored
12
dist/_30s.esm.js
vendored
@ -192,13 +192,11 @@ const currentURL = () => window.location.href;
|
|||||||
const curry = (fn, arity = fn.length, ...args) =>
|
const curry = (fn, arity = fn.length, ...args) =>
|
||||||
arity <= args.length ? fn(...args) : curry.bind(null, fn, arity, ...args);
|
arity <= args.length ? fn(...args) : curry.bind(null, fn, arity, ...args);
|
||||||
|
|
||||||
const debounce = (fn, wait = 0) => {
|
const debounce = (fn, ms = 0) => {
|
||||||
let inDebounce;
|
let timeoutId;
|
||||||
return function() {
|
return function(...args) {
|
||||||
const context = this,
|
clearTimeout(timeoutId);
|
||||||
args = arguments;
|
timeoutId = setTimeout(() => fn.apply(this, args), ms);
|
||||||
clearTimeout(inDebounce);
|
|
||||||
inDebounce = setTimeout(() => fn.apply(context, args), wait);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
12
dist/_30s.js
vendored
12
dist/_30s.js
vendored
@ -198,13 +198,11 @@ const currentURL = () => window.location.href;
|
|||||||
const curry = (fn, arity = fn.length, ...args) =>
|
const curry = (fn, arity = fn.length, ...args) =>
|
||||||
arity <= args.length ? fn(...args) : curry.bind(null, fn, arity, ...args);
|
arity <= args.length ? fn(...args) : curry.bind(null, fn, arity, ...args);
|
||||||
|
|
||||||
const debounce = (fn, wait = 0) => {
|
const debounce = (fn, ms = 0) => {
|
||||||
let inDebounce;
|
let timeoutId;
|
||||||
return function() {
|
return function(...args) {
|
||||||
const context = this,
|
clearTimeout(timeoutId);
|
||||||
args = arguments;
|
timeoutId = setTimeout(() => fn.apply(this, args), ms);
|
||||||
clearTimeout(inDebounce);
|
|
||||||
inDebounce = setTimeout(() => fn.apply(context, args), wait);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
dist/_30s.min.js
vendored
2
dist/_30s.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,10 +1,8 @@
|
|||||||
const debounce = (fn, wait = 0) => {
|
const debounce = (fn, ms = 0) => {
|
||||||
let inDebounce;
|
let timeoutId;
|
||||||
return function() {
|
return function(...args) {
|
||||||
const context = this,
|
clearTimeout(timeoutId);
|
||||||
args = arguments;
|
timeoutId = setTimeout(() => fn.apply(this, args), ms);
|
||||||
clearTimeout(inDebounce);
|
|
||||||
inDebounce = setTimeout(() => fn.apply(context, args), wait);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
module.exports = debounce;
|
module.exports = debounce;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
Test log for: Sun Feb 11 2018 20:20:34 GMT+0000 (UTC)
|
Test log for: Mon Feb 12 2018 20:20:58 GMT+0000 (UTC)
|
||||||
|
|
||||||
> 30-seconds-of-code@0.0.1 test /home/travis/build/Chalarangelo/30-seconds-of-code
|
> 30-seconds-of-code@0.0.1 test /home/travis/build/Chalarangelo/30-seconds-of-code
|
||||||
> tape test/**/*.test.js | tap-spec
|
> tape test/**/*.test.js | tap-spec
|
||||||
@ -1797,14 +1797,14 @@ Test log for: Sun Feb 11 2018 20:20:34 GMT+0000 (UTC)
|
|||||||
|
|
||||||
✔ zipWith is a Function
|
✔ zipWith is a Function
|
||||||
✔ Sends a GET request
|
✔ Sends a GET request
|
||||||
✔ Runs the function provided
|
|
||||||
✔ Sends a POST request
|
✔ Sends a POST request
|
||||||
|
✔ Runs the function provided
|
||||||
✔ Runs promises in series
|
✔ Runs promises in series
|
||||||
✔ Works with multiple promises
|
✔ Works with multiple promises
|
||||||
|
|
||||||
|
|
||||||
total: 901
|
total: 901
|
||||||
passing: 901
|
passing: 901
|
||||||
duration: 2.4s
|
duration: 2.3s
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user