summaryrefslogtreecommitdiff
path: root/node_modules/async/internal/once.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:14:38 +0100
commit18efd30a263ec0d79a26a82cbd8c90c9f81056b7 (patch)
treeaea01bf3506dda706719fc68eb37b77ed9ef3fe8 /node_modules/async/internal/once.js
downloadautoreport-mane.tar.gz
autoreport-mane.tar.bz2
autoreport-mane.zip
Open sourceHEADmane
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