stream-callback

July 18, 2017 · View on GitHub

Last version Build Status Dependency status Dev Dependencies Status NPM Status Donate

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

Contents

  1. 1Install
  2. 2Usage
  3. 3API
  4. 3.1streamCb(options, cb)
  5. 4License