From 3c51c3be85bb0d1bdb87ea0d6632f1c256912f27 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:37:45 +0200 Subject: build: Add some required modules for node --- node_modules/lodash/once.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 node_modules/lodash/once.js (limited to 'node_modules/lodash/once.js') diff --git a/node_modules/lodash/once.js b/node_modules/lodash/once.js new file mode 100644 index 0000000..0706fc3 --- /dev/null +++ b/node_modules/lodash/once.js @@ -0,0 +1,25 @@ +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 _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ +function once(func) { + return before(2, func); +} + +module.exports = once; -- cgit v1.2.3