MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / defer

Function defer

MathBox/mathbox-bundle.js:40624–40630  ·  view source on GitHub ↗

* Defers executing the `func` function until the current call stack has cleared. * Additional arguments will be provided to `func` when it is invoked. * * @static * @memberOf _ * @category Functions * @param {Function} func The function to defer. * @param {...*} [a

(func)

Source from the content-addressed store, hash-verified

40622 * // logs 'deferred' after one or more milliseconds
40623 */
40624 function defer(func) {
40625 if (!isFunction(func)) {
40626 throw new TypeError;
40627 }
40628 var args = slice(arguments, 1);
40629 return setTimeout(function() { func.apply(undefined, args); }, 1);
40630 }
40631
40632 /**
40633 * Executes the `func` function after `wait` milliseconds. Additional arguments

Callers

nothing calls this directly

Calls 2

sliceFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected