Sha256: 5e7d0d593e566a70a91fa7c6939e441c8568169f33f195725d1e84b388876f45
Contents?: true
Size: 679 Bytes
Versions: 14
Compression:
Stored size: 679 Bytes
Contents
var baseDelay = require('../internal/baseDelay'); /** * Invokes `func` after `wait` milliseconds. Any additional arguments are * provided to `func` when it is invoked. * * @static * @memberOf _ * @category Function * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. * @param {...*} [args] The arguments to invoke the function with. * @returns {number} Returns the timer id. * @example * * _.delay(function(text) { console.log(text); }, 1000, 'later'); * // => logs 'later' after one second */ function delay(func, wait) { return baseDelay(func, wait, arguments, 2); } module.exports = delay;
Version data entries
14 entries across 7 versions & 1 rubygems