Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
👜 Callbag operator which converts source to a promise containing last emitted value.
- Host: GitHub
- URL: https://github.com/Andarist/callbag-to-promise
- Owner: Andarist
- Created: 2018-07-16T17:27:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-08T13:31:43.000Z (about 6 years ago)
- Last Synced: 2024-10-24T17:10:28.440Z (3 months ago)
- Topics: callbag, callbags
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-callbags - to-promise
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
})
```