JSPM

data-collector-stream

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31690F
  • License MIT

A read/write stream that collects data

Package Exports

  • data-collector-stream

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (data-collector-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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());
});