ixfx
    Preparing search index...

    Module @ixfx/process - v0.42.0

    The process module contains functions for orchestrating a simple series of data transformations.

    Use flow to create this orchestration:

    const p = flow(
    (value:string) => value.toUpperCase(), // Convert to uppercase
    (value:string) => value.at(0) === 'A') // If first letter is an A, return true
    );

    Once created, the flow can be invoked with an input value:

    p('apple'); // True
    

    Each function in the processing flow takes one input and returns one result. There are a few in-built functions as well. Some of these are stateful, remembering previous values that have been processed (eg seenToUndefined).

    Functions

    average

    Returns the current average of input values

    cancelIfUndefined

    Cancels the remaining flow operations if undefined is an input. See also ifUndefined or ifNotUndefined.

    flow

    Creates a flow of data processors (up to 5 are supported). The flow is encapsulated in a function that accepts an input value an returns an output.

    ifNotUndefined

    Calls a function if the input value is not undefined. Return value from function is passed to next function in flow.

    ifUndefined

    Returns the output of fn if the input value is undefined. See also: ifNotUndefined and cancelIfUndefined.

    max

    Outputs the current largest-seen value

    min

    Outputs the current smallest-seen value

    rank

    Returns the 'best' value seen so far as determined by a ranking function. This is similar to min/max but usable for objects.

    seenLastToUndefined

    If a value is same as the previous value, undefined is emitted instead.

    seenToUndefined

    If a value is same as any previously-seen value, undefined is emitted instead.

    seenToUndefinedByKey

    If a value is the same as any previously-seen value, undefined is emitted instead.

    sum

    Returns a sum of values

    tally

    Returns the tally (ie number of) values

    Classes

    CancelError

    Type Aliases

    Process
    ProcessFactory
    Processors
    Processors1
    Processors2
    Processors3
    Processors4
    Processors5
    RankFunction

    A rank function that compares A and B. Returns the highest value, 'a' or 'b'. Returns 'eq' if values are equal

    RankOptions