Skip to main content
Module

x/rimbu/mod.ts>AsyncReducer.join

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function AsyncReducer.join
import { AsyncReducer } from "https://deno.land/x/rimbu@0.14.0/mod.ts";
const { join } = AsyncReducer;

Returns a Reducer that joins the given input values into a string using the given options.

Examples

Example 1

console.log(Stream.of(1, 2, 3).reduce(Reducer.join({ sep: '-' })))
// => '1-2-3'

Parameters

optional
unnamed 0 = [UNSUPPORTED]
  • an object containing:
  • sep: (optional) a seperator string value between values in the output
  • start: (optional) a start string to prepend to the output
  • end: (optional) an end string to append to the output