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

GitHub

162 stars
8 watching
14 forks
Language: JavaScript
last commit: almost 3 years ago
Linked from 1 awesome list


Backlinks from these awesome lists:

Related projects:

RepositoryDescriptionStars
sindresorhus/p-throttleControls function calls to limit their frequency within a specified time interval447
sindresorhus/p-limitLimits concurrent execution of promise-returning and async functions.2,083
sindresorhus/delayAllows delaying promises by a specified amount of time or a random range.609
isaacs/onceA module to ensure a function is called only once.222
sindresorhus/p-someWait for a specified number of promises to be fulfilled36
sindresorhus/math-clampA utility function to limit a value within a specified range14
sindresorhus/p-allConcurrently execute multiple promise-returning functions with optional concurrency limits.319
sindresorhus/p-anyA utility function to wait for any of multiple promises to be fulfilled with cancellation support.55
sindresorhus/p-timesRuns promise-returning & async functions multiple times concurrently39
sindresorhus/p-eventPromises an event by waiting for it to be emitted, allowing asynchronous iteration and rejection handling.429
sindresorhus/p-each-seriesIterates over promises in serial order, stopping at the first failed promise.50
sindresorhus/p-reduceTransforms an asynchronous list into a single value by applying a reduction function68
sindresorhus/p-lazyA promise class that defers execution until the promise is actually used or specific methods are called269
sindresorhus/p-filterTool for filtering and concurrent execution of promises with an adjustable concurrency level75
sindresorhus/hard-rejectionMakes unhandled promise rejections fail immediately with an error message instead of silently failing.107