What I'd like to do is hiding/erasing all users input from a nodejs console app once entered, so that when the user inserts some text and then types enter, he won't be able to read what he just entered in the console anymore (so basically remove the line right after it's been entered).
This should be pretty simple to achieve but I have no idea how to do it =).
Thank you in advance
EDIT: Let's say we have this code:
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
rl.question('How ya doin?\n', input => {
console.log('seems like you\'r doing ' + input.toString())
})
- The app prompts a question
- The user answers "Fine" (This line shouldn't be there anymore after the user presses enter)
- The program says "seems like .... Fine"