Skip to main content
Module

x/rimbu/mod.ts>Transformer

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

Variables

Returns a transformer that filters elements from the input stream based on the provided predicate function.

Returns a transformer that produces windows/collections of windowSize size, each window starting skipAmount of elements after the previous, and optionally collected by a custom reducer.

Functions

Returns a Transformer instance that converts or filters its input values using given collectFun before passing them to the reducer.

Returns a transformer that returns only those elements from the input that are different to previous element according to the optionally given eq function.

Returns a transformer that applies the given flatMap function to each element of the input stream, and concatenates all the resulting resulting streams into one stream.

Returns a transformer that applies the given flatMap function to each element of the input stream, and concatenates all the resulting resulting streams into one stream, where each resulting element is tupled with the originating input element.

Returns a Transformer that outputs the index of each received element that is equal to the given searchValue value, according to the eq equality function.

Returns a Transformer that outputs the index of each received element that satisfies the given predicate.

Returns a Transfoemr that inserts the given sep stream source elements between each received input element.

Returns a Transformer that collects the received elements into a collector that will be returned as output every time the input matches the given sepElem value.

Returns a Transformer that collects the received elements into a collector that will be returned as output every time the input matches the given sepSlice sequence of elements.

Returns a Transformer that applies the given pred function to each received element, and collects the received elements into a collector that will be returned as output every time the predicate returns true.

Type Aliases

A Reducer that produces instances of StreamSource.NonEmpty.

type alias Transformer
Re-export
import { type Transformer } from "https://deno.land/x/rimbu@1.2.1/mod.ts";

A Reducer that produces instances of StreamSource.

Type Parameters

T
optional
R = T
definition: Reducer<T, StreamSource<R>>