SudoSOS Back-end API / helpers / collectByKey
Function: collectByKey() ​
ts
function collectByKey<T>(
map,
item,
getKey): void;Function that collects items based on a given getKey function
Type Parameters ​
| Type Parameter |
|---|
T |
Parameters ​
| Parameter | Type | Description |
|---|---|---|
map | Map<string | number, T[]> | - |
item | T | - |
getKey | (item) => string | number | - |
Returns ​
void