Creates a Function that groups all elements of an Iterable by using a Mapper function and returns a Map containing the grouped values for each mapped key.
const groupByEvenOdd = groupBy(isEven);const result = groupByEvenOdd([1,2,1,3]);console.log(result); // Map([[1, [1,1,3]], [0, [2]]])
a Map containing the grouped values
the Iterable value type
the Map key type
the key Mapper function
Generated using TypeDoc
Creates a Function that groups all elements of an Iterable by using a Mapper function and returns a Map containing the grouped values for each mapped key.
Example
Returns
a Map containing the grouped values