Returns a collector that creates a group of entries where the group key is calculated by the selector function.
Type of items in the source.
Type of the group key.
A function that returns the group key for each entry.
Collector that creates a group of entries where the group key is calculated by the selector function.
const result = groupByRecordAsync((x) => x % 2)([1, 2, 3]);console.log(result); // { 1 => [1, 3], 0 => [2] } Copy
const result = groupByRecordAsync((x) => x % 2)([1, 2, 3]);console.log(result); // { 1 => [1, 3], 0 => [2] }
Returns a collector that creates a group of entries where the group key is calculated by the selector function.