Version: 0.1.00.2.00.2.10.2.20.3.00.3.10.3.20.4.00.4.10.4.20.5.0-rc.10.5.00.5.10.5.20.6.00.6.10.7.00.8.00.8.10.8.20.9.00.9.10.9.20.10.01.0.0-rc.11.0.0-rc.21.0.0-rc.31.0.01.0.11.0.21.1.01.1.11.2.01.2.11.3.01.3.12.0.02.1.02.2.02.2.12.3.02.4.02.4.12.4.23.0.03.0.13.1.03.2.03.3.03.3.13.4.03.5.03.6.03.7.03.8.03.9.03.9.13.9.23.9.33.10.03.10.14.0.04.0.14.1.04.2.04.2.14.3.04.4.04.5.04.5.14.6.04.6.14.7.04.8.04.8.14.8.24.9.04.10.04.11.04.11.14.11.24.12.04.13.04.13.14.14.04.14.14.14.24.15.04.16.04.16.14.16.24.16.34.16.44.16.54.16.64.17.04.17.14.17.24.17.34.17.44.17.54.17.94.17.104.17.114.17.124.17.134.17.144.17.154.17.164.17.174.17.184.17.194.17.204.17.21
var baseDelay = require('./_baseDelay'),
baseRest = require('./_baseRest');
/**
* Defers invoking the `func` until the current call stack has cleared. Any
* additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to defer.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
* @example
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
* // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
});
module.exports = defer;