UNPKG

typedash

Version:

modern, type-safe collection of utility functions

16 lines (15 loc) 323 B
// src/functions/once/once.ts function once(fn) { let result; let hasBeenCalled = false; return (...args) => { if (!hasBeenCalled) { result = fn(...args); hasBeenCalled = true; } return result; }; } export { once }; //# sourceMappingURL=out.js.map //# sourceMappingURL=chunk-YWJFM556.js.map