$ npm install from2-array
Create a from2 stream based on an array of source values
Useful when you want to create a Readable stream with some values you already have in an array
var from = require('from2-array')
var through = require('through2')
from.obj([{
name:'a'
},{
name:'b'
},{
name:'c'
}]).pipe(through.obj(function(chunk, enc, cb){
console.log('found: ' + chunk.name)
cb()
}))
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE