@jiminp/tooltool
    Preparing search index...

    Module function

    Interfaces

    CachedFunction

    A function wrapper returned by cached representing the wrapped function with caching capabilities.

    ExponentialBackoffOptions
    ExponentialBackoffOptionsWithMaxAttempts
    RateLimitedFunction

    A function wrapper returned by rateLimited that enforces a minimum delay between consecutive executions.

    RetryInfo

    Type Aliases

    AsyncTransformFunction

    An asynchronous transform function that takes a value and optionally returns a transformed value.

    DelayFunction

    Delay function that sleeps for an adequate amount of time.

    DelayFunctionWithForfeit

    Delay function, which shall return false if the retry should be forfeited.

    PageFetcher

    A function that fetches a single page of data.

    Retryable
    TransformFunction

    A synchronous transform function that takes a value and optionally returns a transformed value.

    Functions

    applyAsyncTransforms

    Applies a sequence of asynchronous (and/or synchronous) transform functions to a value.

    applyTransforms

    Applies a sequence of synchronous transform functions to a value.

    batchedForEach

    Asynchronously iterate over an array in batches.

    batchedMap

    Asynchronously maps an array in batches and concatenates the results.

    cached

    Creates a memoized version of an asynchronous function to deduplicate requests and cache results.

    createExponentialBackoffDelay
    fetchPages

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

    forEachPage

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

    getDelayForExponentialBackoff
    identity

    Returns the provided value unchanged.

    invoke

    Invokes the provided function immediately and returns its result.

    nop

    A no-operation function.

    rateLimited

    Wraps an asynchronous function so that it is executed at most once every duration_ms milliseconds. Additional calls are queued and processed sequentially following a strict FIFO (first-come first-served) order.

    retryWithDelay
    sleep

    Pauses execution for the specified duration.