X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2F_baseDelay.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2F_baseDelay.js;h=c397562570cc356a726e90fd6a333634cab39eac;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/_baseDelay.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_baseDelay.js new file mode 100644 index 000000000..c39756257 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts an array + * of `func` arguments. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Object} args The arguments to provide to `func`. + * @returns {number} Returns the timer id. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay;