Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/common/internal.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@1.0.0/common/internal.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

Returns

AsyncReducer<T, string>