source: imaps-frontend/node_modules/lodash-es/defer.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 691 bytes
RevLine 
[d565449]1import baseDelay from './_baseDelay.js';
2import baseRest from './_baseRest.js';
3
4/**
5 * Defers invoking the `func` until the current call stack has cleared. Any
6 * additional arguments are provided to `func` when it's invoked.
7 *
8 * @static
9 * @memberOf _
10 * @since 0.1.0
11 * @category Function
12 * @param {Function} func The function to defer.
13 * @param {...*} [args] The arguments to invoke `func` with.
14 * @returns {number} Returns the timer id.
15 * @example
16 *
17 * _.defer(function(text) {
18 * console.log(text);
19 * }, 'deferred');
20 * // => Logs 'deferred' after one millisecond.
21 */
22var defer = baseRest(function(func, args) {
23 return baseDelay(func, 1, args);
24});
25
26export default defer;
Note: See TracBrowser for help on using the repository browser.