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 ​
| Parameter | Type |
|---|---|
input | TValue[] |
identity | ArrayGroupIdentity<TValue> |
Returns ​
Record<PropertyKey, TValue[]>