Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Node.js streams in the browser

tag: v0.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

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
# or
$ npm install 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');
Something went wrong with that request. Please try again.