Returns a collector that returns a Map from an Iterable.
Type of items in the source.
Type of the key.
Type of the value.
A function that defines the key for each entry.
A function that defines the value for each entry.
Collector that returns a Map from an Iterable.
const result = toMapAsync((x) => x, (x) => x)([1, 2, 3]);console.log(result); // Map {1 => 1, 2 => 2, 3 => 3} Copy
const result = toMapAsync((x) => x, (x) => x)([1, 2, 3]);console.log(result); // Map {1 => 1, 2 => 2, 3 => 3}
Returns a collector that returns a Map from an Iterable.