Function takeWhile

  • Only take elements as long as the filter function returns true.

    The filter function can be asynchronous (in which case the resulting iterator will be asynchronous regardless of the input iterator)!

    Type Parameters

    • TIn

    Parameters

    • filterFn: ((x: TIn) => boolean | Promise<boolean>)
        • (x: TIn): boolean | Promise<boolean>
        • Parameters

          • x: TIn

          Returns boolean | Promise<boolean>

    Returns TTransIteratorSyncOrAsync<TIn, TIn>

Generated using TypeDoc