Node.js streams in the browser

npm install stream
4 downloads in the last day
40 downloads in the last week
208 downloads in the last month


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.


$ 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.emit('data', 'test');
npm loves you