stream-callback
v1.0.4
Published
Turns a stream into a callback.
Downloads
5
Maintainers
Readme
stream-callback
Turns a stream into a callback.
Install
$ npm install stream-callback --save
Usage
var rs = new Readable({objectMode: true})
rs.push({foo: 'bar'})
rs.push({foo: 'bar'})
rs.push(null)
streamCb(rs, console.log)
// => { '0': undefined, '1': [ { foo: 'bar' }, { foo: 'bar' } ] }
API
streamCb(options, cb)
options
Required
Type: stream
object
concatOptions
Type: object
eosOptions
Type: object
cb
Required
Type: function
License
MIT © Kiko Beats