Skip to main content
Module

x/rimbu/mod.ts>Reducer.join

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

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

Reducer<T, string>