JSPM

stream

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

Node.js streams in the browser

Package Exports

  • 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 (stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

stream

Node.js streams in the browser.

Ported straight from the Node.js core and adapted to component/emitter's api.

A testsuite for the browser is there too. Just issue npm install after you've cloned this repo and then open the html file.

Installation

$ component install juliangruber/stream

Usage example

var Stream = require('stream');

var src = new Stream();
src.readable = true;

var dest = new Stream();
dest.writable = true;
dest.write = function(data) {
  assert(data == 'test');
};

src.pipe(dest);

src.emit('data', 'test');