Skip to main content

Utilities operators

tap

Allows to attach a side-effect function to a pipeline, tap passes the stream through. Typically used to add logging.

import { from, map, tap } from "@devicescript/observables"

const obs = from([1, 2, 3])

obs.pipe(
tap(v => console.log(v)),
map(v => v * v)
).subscribe(v => console.log(v))