import { AsyncReducer } from "https://deno.land/x/rimbu@0.13.0/common/index.ts";
const { toJSObject } = AsyncReducer;
Returns an AsyncReducer
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
await AsyncStream.of(['a', 1], ['b', true]).reduce(AsyncReducer.toJSObject()))
// { a: 1, b: true }