Function skipWhile

  • Skip the first elements as long as the filter function returns true, and return all the others unchanged.

    Example

       pipe(
    itr8FromArray([1, 2, 3, 4, 1, 2, 6]),
    skipWhile(x => x < 4), // => [4, 1, 2, 6]
    );

    Type Parameters

    • TIn

    Parameters

    • whileFn: ((v: TIn) => boolean | Promise<boolean>)

      a fuction that returns true as long as elements should be dropped

        • (v: TIn): boolean | Promise<boolean>
        • Parameters

          • v: TIn

          Returns boolean | Promise<boolean>

    Returns TTransIteratorSyncOrAsync<TIn, TIn>

Generated using TypeDoc