callbag-to-promise

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
callbag-to-promise
501.0.14 years ago4 years agoMinified + gzip package size for callbag-to-promise in KB

Readme

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