1.0.1 • Published 6 years ago

callbag-tap-up v1.0.1

Weekly downloads
480
License
MIT
Repository
github
Last release
6 years ago

callbag-tap-up

Callbag operator which performs a side effect for every upwards emission (from sink to source), but other than that it acts as noop.

Example

import forEach from 'callbag-for-each'
import fromIter from 'callbag-from-iter'
import pipe from 'callbag-pipe'
import take from 'callbag-take'
import tapUp from 'callbag-tap-up'

pipe(
  fromIter([10, 20, 30, 40, 50]),
  tapUp(
    data => console.log(data), // always undefined in this example (forEach doesn't send anything up)
    err => console.log(err),
    () => console.log('unsubscribed'),
  ),
  take(2),
  forEach(values => {
    console.log(values) // 10, 20
  }),
)
1.0.1

6 years ago

1.0.0

6 years ago