ixfx
    Preparing search index...

    Namespace Flow

    Control execution

    Logic-oriented

    Rate-oriented

    • debounce: Only handle invocation after a minimum time has elapsed
    • throttle: Only handle invocations at a maximum rate

    Time-oriented

    • timeout: Run code after a specified time delay
    • sleep: Using async await, delay execution for a period
    • sleepWhile: Keep sleeping until a predicate returns true
    • delay: Using async await, run a given callback after a period
    • waitFor: Calls a function and have the possibility to cancel if it takes too long
    • rateMinimum: Ensures that a function is called at a set rate

    Iteration over values

    • repeat / @{link repeatAwait}: Runs a function a given number of times, yielding results as they come in

    Monitoring

    • hasElapsed: Returns true when certain time has passed
    • retryFunction: Keep calling a function until it returns a value
    • retryTask: Keep trying a task until it succeeds
    • waitFor: Try to run something but take action if it fails or doesn't return
    • singleItem: Wait for a single value to be produced
    • SyncWait: Simple synchronisation
    • RequestResponseMatch: Housekeeping of matching requests from A with responses from B and handling failures

    Executing

    Loops

    • continuously: Run code in a loop, as fast as possible or with a delay between each execution
    • delayLoop: A generator that yields at a given rate

    Timers

    Etc

    // If library is stored two directories up under `ixfx/`
    import {continuously, stateMachine} from '../../ixfx/dist/flow.js';
    // Import from web
    import {continuosly, stateMachine} from 'https://unpkg.com/ixfx/dist/flow.js'

    Namespaces

    BehaviourTree
    Elapsed
    StateMachine

    Classes

    DispatchList
    RequestResponseMatch
    SyncWait
    TaskQueueMutable
    WaitForValue

    Type Aliases

    AsyncPromiseOrGenerator
    AsyncTask
    BackoffOptions
    CompletionTimer
    Continuously
    ContinuouslyAsyncCallback
    ContinuouslyOpts
    ContinuouslySyncCallback
    DebouncedFunction
    DelayOpts
    Dispatch
    ExpressionOrResult
    HasCompletion
    HasCompletionRunStates
    Interval
    ModulationTimer
    OnStartCalled
    RateMinimumOptions
    RelativeTimerOpts
    RepeatDelayOpts
    RepeatOpts
    RequestResponseMatchEvents
    RequestResponseOptions
    RetryOpts
    RetryResult
    RetryTask
    RunOpts
    RunSingleOpts
    Since
    SleepOpts
    TaskQueueEvents
    Timeout
    TimeoutAsyncCallback
    TimeoutSyncCallback
    Timer
    TimerOpts
    TimerSource
    UpdateFailPolicy

    Functions

    backoffGenerator
    continuously
    debounce
    delay
    delayLoop
    elapsedMillisecondsAbsolute
    elapsedTicksAbsolute
    elapsedToHumanString
    everyNth
    frequencyTimer
    hasElapsed
    infinity
    interval
    intervalToMs
    isInterval
    ofTotal
    ofTotalTicks
    once
    promiseFromEvent
    promiseWithResolvers
    rateMinimum
    repeat
    repeatSync
    retryFunction
    retryTask
    run
    runOnce
    runSingle
    since
    singleItem
    sleep
    sleepWhile
    throttle
    timeout
    timerAlwaysDone
    timerNeverDone
    timerWithFunction
    updateOutdated
    waitFor