For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/fp/without.md.

without (Functional Programming) es-toolkit

Creates a function that removes specific values from an array. Use it with pipe.

const result = pipe(array, without(...values));
Info

Prefer the original es-toolkit without in ordinary code. Use this fp variant when composing transformations with pipe.

Usage

without removes every value from the piped array that is equal to one of values. It is lazy-capable inside pipe.

import { pipe, without } from 'es-toolkit/fp';

pipe([1, 2, 3, 2], without(2)); // => [1, 3]

Parameters

valuesT[]required

The values to remove from the piped array.

Returns

A function that maps a readonly T[] to an array without values.

(array: readonly T[]) => T[]
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.