source: imaps-frontend/node_modules/lodash-es/delay.js@ d565449

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

Update repo after prototype presentation

  • Property mode set to 100644
File size: 793 bytes
Line 
1import baseDelay from './_baseDelay.js';
2import baseRest from './_baseRest.js';
3import toNumber from './toNumber.js';
4
5/**
6 * Invokes `func` after `wait` milliseconds. Any additional arguments are
7 * provided to `func` when it's invoked.
8 *
9 * @static
10 * @memberOf _
11 * @since 0.1.0
12 * @category Function
13 * @param {Function} func The function to delay.
14 * @param {number} wait The number of milliseconds to delay invocation.
15 * @param {...*} [args] The arguments to invoke `func` with.
16 * @returns {number} Returns the timer id.
17 * @example
18 *
19 * _.delay(function(text) {
20 * console.log(text);
21 * }, 1000, 'later');
22 * // => Logs 'later' after one second.
23 */
24var delay = baseRest(function(func, wait, args) {
25 return baseDelay(func, toNumber(wait) || 0, args);
26});
27
28export default delay;
Note: See TracBrowser for help on using the repository browser.