Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Andarist/callbag-to-promise

👜 Callbag operator which converts source to a promise containing last emitted value.
https://github.com/Andarist/callbag-to-promise

callbag callbags

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# callbag-to-promise

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

## Example

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