Skip to content

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 ​

ParameterTypeDescription
mapMap<string | number, T[]>-
itemT-
getKey(item) => string | number-

Returns ​

void