For reading user input from stdin.
var read = require("read") read(options, callback)
The callback gets called with either the user input, or the default
specified, or an error, in the traditional
Every option is optional.
promptWhat to write to stdout before reading input.
silentDon't echo the output as the user types it.
numMax number of chars to read from terminal.
delimThe char that means we're done. Default:
timeoutNumber of ms to wait for user input before giving up.
defaultThe default value if the user enters nothing.
If silent is true, or num is set, or delim is something other than
"\n", then read will set raw mode, and read character by character.
At this time, backspace and arrow keys are not supported in raw mode. It's probably not too hard to add support for this, perhaps using node's built-in readline module.
In node 0.6.0 through 0.6.5, you must explicitly call
process.exit() when you know that your
program is done reading, or else it will keep the event loop running