Invokes the provided function with the given value, then returns the original value.
The value to pass through the function.
Function to be invoked with the value.
The original value.
const result = tap(5, x => console.log(x)); // logs 5, returns 5 Copy
const result = tap(5, x => console.log(x)); // logs 5, returns 5
1.2.0
Invokes the provided function with the given value, then returns the original value.