• Take items from a stream until a given condition is false, then close the output. The condition function is not called again after it returns false.

    If the condition function is typed as a Typescript type guard (i.e. as returning v is SomeType), then the resulting source will be typed as Source.

    Type Parameters

    • T
    • R

    Parameters

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

          • v: T
          • idx: number

          Returns v is R

    Returns Transformer<T, R>

  • Type Parameters

    • T

    Parameters

    • condition: ((v: T, idx: number) => boolean)
        • (v: T, idx: number): boolean
        • Parameters

          • v: T
          • idx: number

          Returns boolean

    Returns Transformer<T>