▸ partition(arr
: ArrayLike, cb
: ArrayCB): typeof arr[]
A fast Array partitioner.
remakrs
This implementation loops in reverse order.
#
Parameters:Name | Type | Description |
---|---|---|
arr | ArrayLike | The input array-like to filter. |
cb | ArrayCB | The callback provided to produce EITHER truthy/falsy OR numberical indices to indicate the correct bucket. This iteratee is invoked with three arguments: value, index|key, and arr. |
Returns: typeof arr[]
(typeof arr)[] - The partitioned results.
Defined in: unsafe/array/partition.ts:16