Perform a side effect with each element while passing the value on. Useful for inspecting items they pass through a pipeline.
import { pipe } from "yta";import { aside, map, of, toArray } from "yta/async";pipe( of(0, 1, 2, 3, 4), map((n) => n ** 2), aside((n) => { // Inspect the state at this point. console.log(n); }), toArray(),); Copy
import { pipe } from "yta";import { aside, map, of, toArray } from "yta/async";pipe( of(0, 1, 2, 3, 4), map((n) => n ** 2), aside((n) => { // Inspect the state at this point. console.log(n); }), toArray(),);
See also:
The item type
The side effect producing function
Perform a side effect with each element while passing the value on. Useful for inspecting items they pass through a pipeline.
See also: