/prompt-sync

a synchronous prompt for node.js

Primary LanguageJavaScript

SYNOPSIS

A sync prompt for node. very simple. no C++ bindings and no bash scripts.

USAGE

//
// write some text to the screen.
//
process.stdout.write('How many more times? ');

//
// get input from the user.
//
var n = prompt();

//
// do something dumb with it.
//
process.stdout.write(n + ' is ' + n + 'times too many');