summaryrefslogtreecommitdiff
path: root/node_modules/async/internal/once.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/async/internal/once.js')
-rw-r--r--node_modules/async/internal/once.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/async/internal/once.js b/node_modules/async/internal/once.js
new file mode 100644
index 0000000..49f3727
--- /dev/null
+++ b/node_modules/async/internal/once.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = once;
+function once(fn) {
+ function wrapper(...args) {
+ if (fn === null) return;
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, args);
+ }
+ Object.assign(wrapper, fn);
+ return wrapper;
+}
+module.exports = exports["default"]; \ No newline at end of file