Files
vercel_dashboard_example/.pnpm-store/v11/files/00/abd748aaa009636f8ffe9a880671a6a8c7e8bc295c119c90bb19d5211956557dba13e631b437ad6932c3911bfe56070ef0c4912df0bc06542940330855613c
T
2026-05-12 14:53:15 +00:00

26 lines
699 B
Plaintext

var baseDelay = require('../internal/baseDelay'),
restParam = require('./restParam');
/**
* Defers invoking the `func` until the current call stack has cleared. Any
* additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @category Function
* @param {Function} func The function to defer.
* @param {...*} [args] The arguments to invoke the function with.
* @returns {number} Returns the timer id.
* @example
*
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
* // logs 'deferred' after one or more milliseconds
*/
var defer = restParam(function(func, args) {
return baseDelay(func, 1, args);
});
module.exports = defer;