dropWhile (Functional Programming) es-toolkit
Creates a function that drops leading values while a predicate passes. Use it with pipe.
Info
Usage
dropWhile walks the piped array from the beginning and removes values while predicate returns true. It is lazy-capable inside pipe.
Parameters
predicate(item: T, index: number) => booleanrequired
The function that decides whether a leading value should be dropped.
Returns
A function that maps a readonly T[] to the values left after dropping from the beginning.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.