prompt-block
v1.0.2
Published
Simple synchronous/blocking command-line input for Node.js, similar to window.prompt()
Downloads
1
Readme
prompt
Synchronous/blocking, easy-to-use input from stdin for command-line Node.js. Blocking I/O in Javascript is wrong and shouldn't be done! This is only intended for early, simple teaching of input in Javascript, and is designed to have the same parameters as window.prompt()
.
Usage:
const prompt = require('prompt')
const name = prompt('What is your name?', 'Anonymous')
console.log("Hello", name);