MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / delay

Function delay

MathBox/mathbox-bundle.js:40648–40654  ·  view source on GitHub ↗

* Executes the `func` function after `wait` milliseconds. Additional arguments * will be provided to `func` when it is invoked. * * @static * @memberOf _ * @category Functions * @param {Function} func The function to delay. * @param {number} wait The number of mill

(func, wait)

Source from the content-addressed store, hash-verified

40646 * // => logs 'later' after one second
40647 */
40648 function delay(func, wait) {
40649 if (!isFunction(func)) {
40650 throw new TypeError;
40651 }
40652 var args = slice(arguments, 2);
40653 return setTimeout(function() { func.apply(undefined, args); }, wait);
40654 }
40655
40656 /**
40657 * Creates a function that memoizes the result of `func`. If `resolver` is

Callers

nothing calls this directly

Calls 2

sliceFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected