Aggregate streams of string, buffers and objects into promise

npm install stream-aggregate-promise
1 downloads in the last day
1 downloads in the last week
19 downloads in the last month


Aggregates a Node.js stream and calls a callback with the accumulated result of first encountered error.

var aggregate = require('stream-aggregate-promise')

  .then(function(result) { ... })
  .fail(function(err) { ... })

Binary streams (which emit buffer objects) are aggregated into a single buffer, object streams -- into an array of emitted objects and streams of strings -- into a single concatenated string.

npm loves you