@jot/readline
v1.16.2
Published
Read user input from the command line
Readme
readline
Read user input from the command line.
npm install @jot/readlineThis comes in both a sync (blocking) version and an async (promises) version.
Sync usage
import { readline } from '@jot/readline/sync';
const answer = readline('Enter something:');
console.log(`You entered: ${answer}`);Async usage
import { readline } from '@jot/readline';
const answer = await readline('Enter something:');
console.log(`You entered: ${answer}`);