Created
August 20, 2018 18:31
-
-
Save chaiwa-berian/2998408e91dc440479a1e2272e619f7f to your computer and use it in GitHub Desktop.
Writable Stream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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