partitionIndices
partitionIndices<
T>(iterable,predicate): [number[],number[]]
Defined in: group/partition-indices.ts:13
partition reporting positions instead of elements — the single-pass
equivalent of the map/filter/map chain for index extraction.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”Iterable<T>
The input iterable.
predicate
Section titled “predicate”Predicate<[T]>
Returns true for indices going into the first group.
Returns
Section titled “Returns”[number[], number[]]
A tuple [matchingIndices, nonMatchingIndices].