ts-iterable-functions
    Preparing search index...

    Function _skipWhile

    • Skips elements from the source iterable while the predicate evaluates to truthy.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • src: Iterable<T>

        Source iterable to enumerate.

      • pred: IndexedPredicate<T>

        Predicate receiving each element and its index; truthy results continue skipping.

      Returns Iterable<T>

      A deferred iterable that starts yielding once pred first returns falsy.

      Error Rethrows any error thrown by pred.

      const remaining = [..._skipWhile([1, 3, 5, 2, 4], (value) => value < 4)];
      console.log(remaining); // [5, 2, 4]

      or using the curried version:

      const remaining = [
      ...pipeInto(
      [1, 3, 5, 2, 4],
      skipWhile((value) => value < 4)
      ),
      ];
      console.log(remaining); // [5, 2, 4]