summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/lodash/once.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/lodash/once.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/lodash/once.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/lodash/once.js b/bin/wiki/ImportarDesdeURL/node_modules/lodash/once.js
new file mode 100644
index 00000000..0706fc3c
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/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;