import { Reducer } from "https://deno.land/x/rimbu@0.13.0/common/reducer.ts";
const { toJSMap } = Reducer;
Returns a Reducer
that collects received input tuples into a mutable JS Map, and returns
a copy of that map when output is requested.
Examples
Example 1
Example 1
console.log(Stream.of([1, 'a'], [2, 'b']).reduce(Reducer.toJSMap()))
// Map { 1 => 'a', 2 => 'b' }