• Replace each value in a stream using a function (like Array.map)

    The mapping function receives the current index (zero-based) as well as the current value.

    Type Parameters

    • T
    • R

    Parameters

    • mapper: ((v: T, idx: number) => R)
        • (v: T, idx: number): R
        • Parameters

          • v: T
          • idx: number

          Returns R

    Returns Transformer<T, R>