Skip to main content
Module

x/rimbu/mod.ts>AsyncReducer

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

Classes

A base class that can be used to easily create AsyncReducer instances.

Variables

Returns an AsyncReducer that takes boolean values and outputs true if all input values are true, and false otherwise.

A Reducer that calculates the average of all given numberic input values.

Returns an AsyncReducer that remembers the amount of input items provided.

Returns an AsyncReducer that remembers the first input value.

Returns an AsyncReducer that remembers the first input value for which the given pred function returns true.

Returns an AsyncReducer that outputs true if no input values are received, false otherwise.

Returns an AsyncReducer that remembers the last input value.

Returns an AsyncReducer that remembers the last input value for which the given pred function returns true.

Returns a Reducer that remembers the maximum value of the numberic inputs.

Returns a Reducer that remembers the maximum value of the inputs using the given compFun to compare input values

Returns a Reducer that remembers the minimum value of the numberic inputs.

Returns a Reducer that remembers the minimum value of the inputs using the given compFun to compare input values

Returns an AsyncReducer that outputs true if one or more input values are received, false otherwise.

Returns an AsyncReducer that takes boolean values and outputs true if one or more input values are true, and false otherwise.

A Reducer that calculates the product of all given numeric input values.

A Reducer that sums all given numeric input values.

Functions

Returns an AsyncReducer that combines multiple input reducers by providing input values to all of them and collecting the outputs in an array.

Returns an AsyncReducer that combines multiple input reducers by providing input values to all of them and collecting the outputs in the shape of the given object.

Returns an AsyncReducer that outputs false as long as the given elem has not been encountered in the input values, true otherwise.

Returns an AsyncReducer with the given options:

Returns an AsyncReducer of which the input, state, and output types are the same.

Returns an AsyncReducer of which the state and output types are the same.

Returns an AsyncReducer that ouputs true as long as all input values satisfy the given pred, false otherwise.

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

Returns a Reducer that ouputs false as long as no input value satisfies given pred, true otherwise.

Returns an AsyncReducer that collects received input values in an array, and returns a copy of that array as an output value when requested.

Returns a AsyncReducer that collects received input tuples into a mutable JS Map, and returns a copy of that map when output is requested.

Returns an AsyncReducer that collects 2-tuples containing keys and values into a plain JS object, and returns a copy of that object when output is requested.

Returns an AsyncReducer that collects received input values into a mutable JS Set, and returns a copy of that map when output is requested.

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

An AsyncReducer is a stand-alone asynchronous calculation that takes input values of type I, and, when requested, produces an output value of type O.

Type Parameters

I
optional
O = I
definition: AsyncReducer.Impl<I, O, unknown>