This commit is contained in:
DeSqBlocki
2026-08-15 08:34:09 +02:00
parent eda2b2964a
commit 9377403f61
879 changed files with 118808 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = onlyOnce;
function onlyOnce(fn) {
return function (...args) {
if (fn === null) throw new Error("Callback was already called.");
var callFn = fn;
fn = null;
callFn.apply(this, args);
};
}
module.exports = exports.default;