Created
January 17, 2018 10:38
-
-
Save syzer/d0246a72d5516654d5a56cce26678b5b to your computer and use it in GitHub Desktop.
readline by line.. do not terminate, can use object-stream-tools
This file contains 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
if (module.parent) { | |
return | |
} | |
const readline = require('readline') | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
// terminal: false // isTTY | |
}) | |
rl.on('line', (line) => { | |
console.log('line', line) | |
}) |
Author
syzer
commented
Jan 17, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment