{ "name": "read", "version": "0.1.0", "main": "lib/read.js", "dependencies": {}, "devDependencies": { "tap": "*" }, "engines": { "node": ">=0.6" }, "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "description": "read(1) for node programs", "repository": { "type": "git", "url": "git://github.com/isaacs/read.git" }, "license": "BSD", "scripts": { "test": "tap test/*.js" }, "readme": "For reading user input from stdin.\n\n## USAGE\n\n```javascript\nvar read = require(\"read\")\nread(options, callback)\n```\n\nThe callback gets called with either the user input, or the default\nspecified, or an error, in the traditional `callback(error, result)`\nnode style.\n\n## OPTIONS\n\nEvery option is optional.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `num` Max number of chars to read from terminal.\n* `timeout` Number of ms to wait for user input before giving up.\n* `default` The default value if the user enters nothing.\n\nIf silent is true, or num is set, and the input is a TTY,\nthen read will set raw mode, and read character by character.\n\nAt this time, backspace and arrow keys are not supported very well.\nIt's probably not too hard to add support for this, perhaps using node's\nbuilt-in readline module.\n\n## CONTRIBUTING\n\nPatches welcome.\n\n## BUGS\n\nIn node 0.6.0 through 0.6.5, you must explicitly call\n`process.stdin.destroy()` or `process.exit()` when you know that your\nprogram is done reading, or else it will keep the event loop running\nforever.\n\nSee: \n", "_id": "read@0.1.0", "_from": "read@0" }