stream
This is a browser-compatible version of the node.js stream
module. Thus, you can use the node docs as the docs for this library: http://nodejs.org/api/stream.html.
This is a quick example of how to make a readable stream of random numbers
var Readable = ; { var randomNumberStream = opts; randomNumberStream { this; }; return randomNumberStream;} var myRandomNumberStream = ;myRandomNumberStream;
There is one slight addition from what node implements, and that is the Readable.prototype.forEach
method, which behaves much like the Observable.prototype.forEach
method (docced as subscribe) in RxJS;
// full signaturevar subscription = readable;// Remove relevant listenerssubscription; // or, more commonlyreadable;