Chunks an input stream into size
chunks.
Ensure a minimum length of time between values. Values being produced too quickly are dropped.
Add delay before/after values are emitted from the input stream.
Drops all values from input stream for which predicate
returns true
Allow values through until a duration has elapsed. After that, the chain stops.
Filters the input source, only allowing through
data for which predicate
returns true
Returns the largest value from the input.
Returns the smallest value from the input. Can work with numbers or number[] as input. Non-numeric data is filtered out.
Emits the currently ranked 'highest' value from a stream. Only values exceeding the current highest are emitted.
Emits the highest-ranked value from amongst an array of values.
Takes an array of values, flattening to a single one
using the provided reducer
function.
Returns the total of the numeric values. Non-numeric values are filtered out.
Take limit
number of results from the stream, before closing
Returns a running tally of how many items have been emitted from the input source.
const ch = Chains.run(
Chains.From.timestamp({ interval: 100 }),
Chains.Links.tally()
Transform values from one type to another. Just like a map function.
Returns the average from the input. Non-numeric values are filtered out.