Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Andarist/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.
https://github.com/Andarist/callbag-tap-up
callbag callbags
Last synced: 18 days ago
JSON representation
👜 Callbag operator which performs a side effect for every upwards emission (from sink to source), but other than that it acts as noop.
- Host: GitHub
- URL: https://github.com/Andarist/callbag-tap-up
- Owner: Andarist
- Created: 2018-07-18T09:37:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T21:21:23.000Z (about 6 years ago)
- Last Synced: 2024-10-20T06:22:59.732Z (24 days ago)
- Topics: callbag, callbags
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-callbags - tap-up
README
# 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
```js
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
}),
)
```