Skip to content

Convert an asynchronous pullable callbag source to a promise array

License

Notifications You must be signed in to change notification settings

Risto-Stevcev/callbag-to-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Convert an asynchronous pullable callbag source to a promise array

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published