node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

pull-generator

pull-generator

Create a Pull Stream from a Generator.

npm i pull-generator
const pull = require('pull-stream')
const pull_gen = require('pull-generator')
 
function* generator() {
  yield 1
  yield 2
}
 
pull(pull_gen(generator()), pull.log)
// prints: 
// 1 
// 2 

License

Apache-2.0