* Creates a function that executes `func`, with the `this` binding and * arguments of the created function, only after being called `n` times. * * @static * @memberOf _ * @category Functions * @param {number} n The number of times the function must be called before
(n, func)
| 40269 | * // => logs 'Done saving!', after all saves have completed |
| 40270 | */ |
| 40271 | function after(n, func) { |
| 40272 | if (!isFunction(func)) { |
| 40273 | throw new TypeError; |
| 40274 | } |
| 40275 | return function() { |
| 40276 | if (--n < 1) { |
| 40277 | return func.apply(this, arguments); |
| 40278 | } |
| 40279 | }; |
| 40280 | } |
| 40281 | |
| 40282 | /** |
| 40283 | * Creates a function that, when called, invokes `func` with the `this` |
nothing calls this directly
no test coverage detected