@jiminp/tooltool
    Preparing search index...

    Module function

    Interfaces

    CachedFunction

    A function wrapper returned by cached with caching capabilities.

    ExponentialBackoffOptions

    Options for exponential backoff delay.

    ExponentialBackoffOptionsWithMaxAttempts

    Exponential backoff options with a maximum attempt limit.

    RateLimitedFunction

    A function wrapper returned by rateLimited enforcing a minimum delay between calls.

    RetryInfo

    Information passed to retry-related callbacks.

    Type Aliases

    AsyncTransformFunction

    An asynchronous transform function.

    DelayFunction

    A delay function that sleeps between retry attempts.

    DelayFunctionWithForfeit

    A delay function that returns false to forfeit further retries.

    PageFetcher

    A function that fetches a single page of data.

    Retryable

    An async function that can be retried.

    TransformFunction

    A synchronous transform function.

    Functions

    applyAsyncTransforms

    Applies a sequence of async (or sync) transform functions to a value.

    applyTransforms

    Applies a sequence of synchronous transform functions to a value.

    batchedForEach

    Asynchronously iterates over an array in batches.

    batchedMap

    Asynchronously maps an array in batches and concatenates results.

    cached

    Creates a memoized async function that deduplicates in-flight requests and caches results.

    createExponentialBackoffDelay

    Creates an exponential backoff delay function for use with retryWithDelay.

    fetchPages

    Fetches pages as an async generator, yielding each non-nullish page with its index.

    forEachPage

    Fetches multiple pages in parallel and invokes a callback for each non-nullish page.

    getDelayForExponentialBackoff

    Computes the delay for a given attempt using exponential backoff.

    identity

    Returns the provided value unchanged.

    invoke

    Invokes the provided function immediately and returns its result.

    nop

    A no-operation function that accepts any arguments and returns undefined.

    rateLimited

    Wraps an async function to enforce a minimum delay between consecutive executions.

    retryWithDelay

    Retries an async function until it succeeds, using a delay function between attempts.

    sleep

    Pauses execution for the specified duration.

    unreachable

    Asserts that a code path is unreachable; throws if executed.