callbag-to-promise

1.0.1 • Public • Published

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
})

/callbag-to-promise/

    Package Sidebar

    Install

    npm i callbag-to-promise

    Weekly Downloads

    959

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    2.9 kB

    Total Files

    4

    Last publish

    Collaborators

    • andarist