Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Latest commit

 

History

History
54 lines (35 loc) · 1.38 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.38 KB

stream-callback

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