@ristostevcev/callbag-to-promise
v1.0.0
Published
Convert a stream into a promise
Downloads
1
Readme
callbag-to-promise
Convert an entire stream into a promise
Install
yarn install @ristostevcev/callbag-to-promise
Usage
const { pipe, interval, map, take } = require('callbag-basics')
const toPromise = require('@ristostevcev/callbag-to-promise')
pipe(
interval(50),
map(e => e * 2),
take(5),
toPromise
)
// Promise [0, 2, 4, 6, 8]
License
See LICENSE