npm.io
1.0.1 • Published 8 years ago

callbag-to-promise

Licence
MIT
Version
1.0.1
Deps
2
Size
3 kB
Vulns
0
Weekly
0
Stars
5

callbag-to-promise

Callbag operator which converts source to a promise containing last emitted value.

Example

import interval from 'callbag-interval'
import pipe from 'callbag-pipe'
import takeUntil from 'callbag-take-until'
import toPromise from 'callbag-to-promise'

pipe(
  interval(30),
  takeUntil(interval(200)),
  toPromise,
).then(value => {
  console.log(value) // 5
})

Keywords