Sha256: 4fb254d9721ef1d85d2b1b3eebd765d8a8cd269a6afe066449c16f56781c1740
Contents?: true
Size: 699 Bytes
Versions: 153
Compression:
Stored size: 699 Bytes
Contents
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;
Version data entries
153 entries across 80 versions & 8 rubygems