tapObservablePipe
Alternative: tap$$$
Inlined: tapObservable
, tap$$
Types
function tapObservablePipe<GValue>(
tapFunction: ITapFunction<GValue>,
): IObservablePipe<GValue, GValue>
Definition
This pipe returns an Observable identical to the source, but runs the specified callback for each item.
This is mainly used when you want to affect outside state with a notification without altering the notification.
The RxJS equivalent is tap.
Diagram
Example
Log incoming values
const subscribe = pipe$$(of(0, 1, 2), [
tap$$$(x => console.log(x)),
]);
subscribe((value) => {
// ...
});
Output:
0
1
2