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

x/rimbu/core/main/exports.ts>Reducer.join

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Reducer.join
import { Reducer } from "https://deno.land/x/rimbu@1.0.3/core/main/exports.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>