Node.js streams

Run Settings
LanguageJavaScript
Language Version
Run Command
var stream = require("stream"); var rstream = (function() { var i = 0; var rstream = new stream.Readable(); rstream._read = function(){ return this.push(++i > 2 ? "" : ["hello","world"][i-1]); }; return rstream })(); var wstream = new stream.Writable(); wstream._write = function(chunk, enc, next){ console.log("w", chunk.toString()); return next(); }; rstream.pipe(wstream);
Editor Settings
Theme
Key bindings
Full width
Lines