import { Reducer } from "https://deno.land/x/rimbu@0.13.0/common/reducer.ts";
const { toJSObject } = Reducer;
Returns a Reducer
that collects 2-tuples containing keys and values into a plain JS object, and
returns a copy of that object when output is requested.
Examples
Example 1
Example 1
console.log(Stream.of(['a', 1], ['b', true]).reduce(Reducer.toJSObject()))
// { a: 1, b: true }