Documentation / @ripl/utilities / arrayGroup
Function: arrayGroup()
arrayGroup<
TValue>(input,identity):Record<PropertyKey,TValue[]>
Defined in: packages/utilities/src/collection.ts:111
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[]>