Skip to content

Instantly share code, notes, and snippets.

@mfowlewebs
Created November 12, 2015 21:33
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 mfowlewebs/89b0e2a706c0ae32e821 to your computer and use it in GitHub Desktop.
Save mfowlewebs/89b0e2a706c0ae32e821 to your computer and use it in GitHub Desktop.
process.stdin.once("readable", function(){
this.read();
function on(thing){
process.stdin.on(thing, function(){
console.log(thing)
})};
on("readable");
on("data");
on("end");
on("close");
on("error");
this.end();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment