• Emits the highest-ranked value from amongst an array of values.

    By default, it tracks the highest-ranked between arrays.

    For example:

    // Input
    [ [4,5,6], [1,2,3] ]
    // Outputs:
    [ 6 ]

    This behaviour can be modified with an option to only compare within arrays.

    // Input
    [ [4,5,6], [1,2,3] ]
    // Output:
    [ 6, 3 ]

    Uses the rank option to determine which is more highly ranked.

    Chains.Links.rankArray(
    (a, b) => {
    if (a > b) return `a`; // a is higher
    else if (b > a) return `b`; // b is higher
    return `eq`; // same
    }
    )

    Type Parameters

    • In

    Parameters

    Returns Link<In[], In>