groupBy
groupBy<
K,A>(keyFn): (items) =>ReadonlyMap<K, readonlyA[]>
Defined in: Data/Dict.ts:84
Groups elements of an array into a dictionary keyed by the result of keyFn. Each key maps
to the array of elements that produced it, in insertion order. Uses the native Map.groupBy
when available, falling back to a manual loop in older environments.
Type Parameters
Section titled “Type Parameters”K
A
Parameters
Section titled “Parameters”(a) => K
Returns
Section titled “Returns”(items) => ReadonlyMap<K, readonly A[]>