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%2Fonce.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2Fonce.js;h=75f7d99b7797f671b2f19a1ead811c553221c90b;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/once.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/once.js new file mode 100644 index 000000000..75f7d99b7 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/once.js @@ -0,0 +1,24 @@ +var before = require('./before'); + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ +function once(func) { + return before(2, func); +} + +module.exports = once;