pullAt es-toolkit
Removes elements at specified indices from an array and returns the removed elements.
Usage
pullAt(arr, indicesToRemove)
Use pullAt when you want to remove elements at specific positions in an array. This function modifies the original array and returns the removed elements in a new array. It also supports negative indices, which count from the end of the array.
If you specify a non-existent index, undefined is returned for that position.
Parameters
The array from which to remove elements.
An array of indices of elements to remove. Negative indices count from the end of the array.
Returns
A new array containing the removed elements. For non-existent indices, undefined is included.
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.