tap
Returns a function that runs a side-effect and returns the value unchanged.
Useful for debugging inside flow pipelines without breaking the chain.
Usage
tap<T>(fn: (value: T) => unknown)
Returns a function that runs a side-effect and returns the value unchanged.
Useful for debugging inside flow pipelines without breaking the chain.
Parameters
fn(value: T) => unknownrequired
the side-effecting function to run with each value.
Returns
a function that runs fn and returns its input unchanged.