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
  • delay: Using async await, run a given callback after a period
  • interval: Generates values from a given function with a given delay
  • waitFor: Calls a function and have the possibility to cancel if it takes too long

Iteration over values

  • forEach / forEachAsync: Loop over an iterable or array, with the possibility of early exit
  • repeat: Runs a function a given number of times, yielding results as they come in

Monitoring

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

Example: Importing

// 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'

Index

Namespaces

Classes

Type Aliases

Functions