1
0

run npm install to generate a package lock

This commit is contained in:
sashinexists
2024-12-07 13:18:31 +11:00
parent e7d08a91b5
commit 23437d228e
2501 changed files with 290663 additions and 0 deletions

26
node_modules/function-once/readme.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
# Function Once
Wraps a function so that it's only ever executed once.
Note: `this` is always set to `undefined` and only functions that don't accept any arguments are supported, as using those with a function that's only ever executed once is practically just a footgun. If you need different `this` or different arguments you should probably use memoization instead.
## Install
```sh
npm install --save function-once
```
## Usage
```ts
import once from 'function-once';
const rand = once (() => Math.random ());
rand (); // => 0.3344627371267874
rand (); // => 0.3344627371267874
```
## License
MIT © Fabio Spampinato