onetime
Call limiter
Ensures a function is only called once by wrapping it in a wrapper function that throws an error if called again
Ensure a function is only called once
162 stars
8 watching
14 forks
Language: JavaScript
last commit: about 1 year ago
Linked from 1 awesome list
Related projects:
Repository | Description | Stars |
---|---|---|
sindresorhus/p-throttle | A utility for rate-limiting function calls to prevent excessive usage and ensure efficient resource utilization | 443 |
sindresorhus/p-limit | Limits concurrent execution of promise-returning and async functions. | 2,037 |
sindresorhus/delay | Allows delaying promises by a specified amount of time or a random range. | 609 |
isaacs/once | A module to ensure a function is called only once. | 222 |
sindresorhus/p-some | Wait for a specified number of promises to be fulfilled | 36 |
sindresorhus/math-clamp | A utility function to limit a value within a specified range | 14 |
sindresorhus/p-all | Concurrently execute multiple promise-returning functions with optional concurrency limits. | 315 |
sindresorhus/p-any | A utility function to wait for any of multiple promises to be fulfilled with cancellation support. | 55 |
sindresorhus/p-times | Runs promise-returning & async functions multiple times concurrently | 38 |
sindresorhus/p-event | Promises an event by waiting for it to be emitted, allowing asynchronous iteration and rejection handling. | 429 |
sindresorhus/p-each-series | Iterates over promises in serial order, stopping at the first failed promise. | 50 |
sindresorhus/p-reduce | Transforms an asynchronous list into a single value by applying a reduction function | 68 |
sindresorhus/p-lazy | A promise class that defers execution until the promise is actually used or specific methods are called | 266 |
sindresorhus/p-filter | Tool for filtering and concurrent execution of promises with an adjustable concurrency level | 72 |
sindresorhus/hard-rejection | Makes unhandled promise rejections fail immediately with an error message instead of silently failing. | 107 |