Sep 7, 2018 · 1 min read
It’s one of those functions that is incredibly useful. I use it all the time. Especially for something like this:
const log = tap(console.log.bind(console))const x = log('Hello')
x //=> 'Hello'
// Now I can do things like this:myPromise
.then(log)
.then(x => doSomethingWith(x))
.then(log)
Without a tapped logger, x would have been undefined.
