without es-toolkit
Creates a new array excluding specific values from the array.
Usage
without(arr, ...values)
Use without when you want to remove unwanted specific values from an array. The original array is not modified, and a new array with the specified values removed is returned.
It also handles NaN values correctly.
Parameters
arrreadonly T[]required
The array from which to remove values.
...valuesArray<T>required
The values to remove from the array.
Returns
Returns a new array with the specified values removed.
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.