dropWhile
dropWhile<
T>(iterable,predicate):IterableIterator<T>
Defined in: packages/core/src/iterable/drop-while.ts:18
Skips elements from the start for as long as predicate holds, then yields
everything from the first rejected element onwards.
The predicate is not consulted again once it has rejected, so a later element that would satisfy it is still yielded. That is what separates this from filtering.
Time complexity: O(1) per element.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”Iterable<T>
The input iterable.
predicate
Section titled “predicate”Predicate<[T, number]>
Receives each element and its zero-based index. Skipping
stops the first time it returns false.
Returns
Section titled “Returns”IterableIterator<T>
An iterator over the elements from the first rejection onwards.