Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Collect a readable stream's output and errors
JavaScript
branch: master
Failed to load latest commit information.
.gitignore initial commit
.travis.yml 0.10 only
History.md add history
README.md doc
index.js doc
package.json Release 1.0.0
test.js initial commit

README.md

collect-stream

Collect a readable stream's output and errors.

build status

Usage

Give it a readable stream and a function and it will call latter with the potential error and a smart representation of the data the stream emitted.

var collect = require('collect-stream');

collect(stringStream, function(err, data) {
  console.log(data); // one string
});

collect(bufferStream, function(err, data) {
  console.log(data); // one buffer
});

collect(objectStream, function(err, data) {
  console.log(data); // an array of objects
});

Installation

$ npm install collect-stream

License

MIT

Something went wrong with that request. Please try again.