Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A read/write stream that collects data

branch: master
Octocat-spinner-32 .gitignore Initial commit
Octocat-spinner-32 LICENSE package and license files
Octocat-spinner-32 README.md initial code
Octocat-spinner-32 index.js initial code
Octocat-spinner-32 package.json add test... sort of
Octocat-spinner-32 test.js add test... sort of
README.md

data-collector-stream

A read/write stream that collects data

var Stream = require('stream'),
  fs = require('fs'),
  Collector = require('./streams/collector');

var collector = new Collector();
fs.createReadStream('./large-file.txt').pipe(collector);
collector.on('end', function() {
    console.log(collector.getBytesWritten());
    console.log(collector.getData());
});
Something went wrong with that request. Please try again.