Skip to content

Taps

Tapping allows emitted values from one stream to be utilised in parallel, not affecting the regular emitted values of a stream.

Rx.tapOps taps a stream, processing values through a series of operators.

const rx = Rx.tapOps(source, op1, op2, op3);
// Return value is a new Reactive capturing the final output

Rx.tapProcess taps a stream, processing values through a series of simple processor functions, which take an input and return an input.

const rx = Rx.tapProcess(source,
Data.Process.average
);
// rx is a reactive stream capturing average values

A processor function is simple: it takes a single input value and returns a single input value.

Rx.tapStream taps a stream, sending values to another stream, but still passing them through the original stream as usual. It returns the original input.

source = Rx.tapStream(source, someOtherStream);
// where 'someOtherStream' is a writable reactive.