Skip to content

Instantly share code, notes, and snippets.

@chaiwa-berian
Created August 20, 2018 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaiwa-berian/2998408e91dc440479a1e2272e619f7f to your computer and use it in GitHub Desktop.
Save chaiwa-berian/2998408e91dc440479a1e2272e619f7f to your computer and use it in GitHub Desktop.
Writable Stream
var Writable = require('stream').Writable;
var ws = Writable();
ws._write = function (chunk, enc, next) {
console.dir(chunk);
next();
};
process.stdin.pipe(ws);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment