> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# dropWhile (Functional Programming) es-toolkit

Creates a function that drops leading values while a predicate passes. Use it with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
const result = pipe(array, dropWhile(predicate));
```

::: info

Prefer the original es-toolkit [`dropWhile`](https://massaman.dev/reference/array/dropWhile.md) in ordinary code. Use this `fp` variant when composing transformations with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

:::

## Usage

`dropWhile` walks the piped array from the beginning and removes values while `predicate` returns `true`. It is lazy-capable inside [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
import { dropWhile, pipe } from 'es-toolkit/fp';

pipe(
  [1, 2, 3, 1],
  dropWhile(value => value < 3)
); // => [3, 1]
```

#### 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.

```typescript
(array: readonly T[]) => T[]
```


Source: es-toolkit

Re-exported verbatim from [`es-toolkit`](https://es-toolkit.dev/fp/reference/dropWhile.html). Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.
