Skip to content

Documentation / @ripl/utilities / arrayGroup

Function: arrayGroup() ​

arrayGroup<TValue>(input, identity): Record<PropertyKey, TValue[]>

Defined in: collection.ts:108

Groups array items by a property key or indexer function into a keyed record.

Type Parameters ​

Type Parameter
TValue

Parameters ​

ParameterType
inputTValue[]
identityArrayGroupIdentity<TValue>

Returns ​

Record<PropertyKey, TValue[]>