Methods
groupBy
- groupBy(discriminator): Map<number, T[]>
-
Parameters
-
discriminator: ((value, index, array) => number)
-
- (value, index, array): number
-
Parameters
-
value: T
-
index: number
-
array: T[]
Returns number
Returns Map<number, T[]>
- groupBy(discriminator): Map<string, T[]>
-
Parameters
-
discriminator: ((value, index, array) => string)
-
- (value, index, array): string
-
Parameters
-
value: T
-
index: number
-
array: T[]
Returns string
Returns Map<string, T[]>
Partitions this array into a Map of arrays according to some
discriminator
function.