Skip to content

andreypopp/stream-aggregate-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stream-aggregate-promise

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

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

aggregate(stream)
  .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.

About

Aggregate object, binary or string streams into a promise

Resources

License

Stars

Watchers

Forks

Packages

No packages published