* 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)
| 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 |
nothing calls this directly
no test coverage detected