Utilities for asynchronous operations, like delays, debouncing, or pooling
default
Provide help with asynchronous tasks like delays, debouncing, deferring, or pooling.
Make AsyncIterable abortable with the given signal.
Make Promise abortable with the given signal.
Create a promise which will be rejected with DeadlineError when
a given delay is exceeded.
Error thrown when Deadline times out.
Creates a debounced function that delays the given func
by a given wait time in milliseconds. If the method is called
again before the timeout expires, the previous call will be
aborted.
A debounced function that will be delayed by a given wait
time in milliseconds. If the method is called again before
the timeout expires, the previous call will be aborted.
Error message emitted from the thrown error while mapping.
Multiplexes multiple async iterators into a single stream. It currently makes an assumption that the final result (the value returned and not yielded from the iterator) does not matter; if there is any result, it is discarded.
pooledMap transforms values from an (async) iterable into another async iterable. The transforms are done concurrently, with a max concurrency defined by the poolLimit.
Calls the given (possibly asynchronous) function up to maxAttempts times.
Retries as long as the given function throws. If the attempts are exhausted,
throws a RetryError with cause set to the inner exception.
Error thrown in retry once the maximum number of failed attempts
has been reached.
Branches the given async iterable into the n branches.
Utility for representing n-tuple. Used in tee.
Utility for representing n-tuple of. Used in Tuple.
Make AsyncIterable abortable with the given signal.
Make Promise abortable with the given signal.
Create a promise which will be rejected with DeadlineError when
a given delay is exceeded.
Error thrown when Deadline times out.
Creates a debounced function that delays the given func
by a given wait time in milliseconds. If the method is called
again before the timeout expires, the previous call will be
aborted.
A debounced function that will be delayed by a given wait
time in milliseconds. If the method is called again before
the timeout expires, the previous call will be aborted.
Multiplexes multiple async iterators into a single stream. It currently makes an assumption that the final result (the value returned and not yielded from the iterator) does not matter; if there is any result, it is discarded.
Error message emitted from the thrown error while mapping.
pooledMap transforms values from an (async) iterable into another async iterable. The transforms are done concurrently, with a max concurrency defined by the poolLimit.
Calls the given (possibly asynchronous) function up to maxAttempts times.
Retries as long as the given function throws. If the attempts are exhausted,
throws a RetryError with cause set to the inner exception.
Error thrown in retry once the maximum number of failed attempts
has been reached.