Open joshuabremerdexcom opened 2 years ago
Came here looking for an alternative after noticing the npm audit warning. Thanks for sharing!
readline-sync seems now, itself, deprecated.
The node:readline
module looks like it's easy enough to use by itself:
import * as readline from 'node:readline/promises';
import { stdin as input, stdout as output } from 'node:process';
const rl = readline.createInterface({ input, output });
const answer = await rl.question('What do you think of Node.js? ');
console.log(`Thank you for your valuable feedback: ${answer}`);
rl.close();
This repo has a vulnerability that isn't being addressed. This repo seems abandoned. I wanted to offer an alternative that is working well for me with the readline sync package (https://github.com/anseki/readline-sync#utility_methods-keyinyn):
Before:
After using readline-sync: