async-ask
v1.2.0
Published
simple prompt questioning for beginners
Downloads
3
Maintainers
Readme
async-ask
Simple prompt questioning for beginners
Installation
npm install --save async-ask
Dependencies
node.js/readline
Usage
import {ask, closeAsk} from 'async-ask';
async function main() {
const answer = await ask('Hello, world? ');
switch (answer) {
case 'Hello, indeed': {
console.log('Sounds great.');
break;
}
default: {
console.log('Good for you.');
break;
}
}
closeAsk();
}
main.catch((e) => console.error(e));