Type Parameters
-
Item
-
Key extends PropertyKey
Parameters
-
grouper: Unary<Item, Key>
Returns (<Iterable>(iterable) => ReducerOutput<Iterable, ReadOnlyRecord<Key, ReadOnlyArray<Item>>>)
Object with grouped values.
-
- <Iterable>(iterable): ReducerOutput<Iterable, ReadOnlyRecord<Key, ReadOnlyArray<Item>>>
-
Type Parameters
-
Iterable extends IsomorphicIterable<Item>
Returns ReducerOutput<Iterable, ReadOnlyRecord<Key, ReadOnlyArray<Item>>>
Groups values of an iterable or asynchronous iterable in an object based on the output of the
grouper
function.Example