Skip to main content

partition(arr: ArrayLike, cb: ArrayCB): typeof arr[]

A fast Array partitioner.

remakrs

This implementation loops in reverse order.

Parameters:#

NameTypeDescription
arrArrayLikeThe input array-like to filter.
cbArrayCBThe 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