@jot/readline
v1.16.2
Published
Read user input from the command line
Downloads
17
Readme
readline
Read user input from the command line.
npm install @jot/readline
This 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}`);