Removed modules/contrib/media module to allow update to the core media module
[yaffs-website] / node_modules / uncss / node_modules / lodash / delay.js
1 var baseDelay = require('./internal/baseDelay'),
2     rest = require('./rest'),
3     toNumber = require('./toNumber');
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  * @category Function
12  * @param {Function} func The function to delay.
13  * @param {number} wait The number of milliseconds to delay invocation.
14  * @param {...*} [args] The arguments to invoke `func` with.
15  * @returns {number} Returns the timer id.
16  * @example
17  *
18  * _.delay(function(text) {
19  *   console.log(text);
20  * }, 1000, 'later');
21  * // => logs 'later' after one second
22  */
23 var delay = rest(function(func, wait, args) {
24   return baseDelay(func, toNumber(wait) || 0, args);
25 });
26
27 module.exports = delay;