{"_id":"prompt-for","_rev":"371004","name":"prompt-for","description":"Prompt the user for a series of answers.","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"time":{"modified":"2021-07-27T02:36:15.000Z","created":"2014-03-09T01:30:16.013Z","1.1.2":"2015-03-30T01:42:21.270Z","1.1.1":"2015-03-30T01:40:58.873Z","1.1.0":"2015-03-30T01:27:44.386Z","1.0.0":"2015-03-29T03:11:59.518Z","0.5.1":"2015-03-28T05:13:43.956Z","0.5.0":"2014-10-04T20:10:28.146Z","0.4.1":"2014-05-28T00:45:05.341Z","0.4.0":"2014-04-30T01:32:37.658Z","0.3.0":"2014-04-30T00:57:27.993Z","0.2.0":"2014-04-24T21:44:58.781Z","0.1.0":"2014-03-27T16:47:52.961Z","0.0.3":"2014-03-12T06:22:34.750Z","0.0.2":"2014-03-09T22:08:06.525Z","0.0.1":"2014-03-09T01:30:16.013Z"},"users":{},"repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"versions":{"1.1.2":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"1.1.2","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"gitHead":"4bcd28f1a1ad76276942a05e1a738345c38da1f7","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@1.1.2","scripts":{},"_shasum":"22d0847e7920ec904806c4f7399369b3ab5246d9","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"22d0847e7920ec904806c4f7399369b3ab5246d9","size":3810,"noattachment":false,"key":"/prompt-for/-/prompt-for-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-1.1.2.tgz"},"directories":{},"publish_time":1427679741270,"_cnpm_publish_time":1427679741270,"_hasShrinkwrap":false},"1.1.1":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"1.1.1","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"gitHead":"663ec1c0e62da9c4a343ef746d1992629a9af9d1","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@1.1.1","scripts":{},"_shasum":"72f206b045469acc7ce84f406ca7dff717475a28","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"72f206b045469acc7ce84f406ca7dff717475a28","size":3794,"noattachment":false,"key":"/prompt-for/-/prompt-for-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-1.1.1.tgz"},"directories":{},"publish_time":1427679658873,"_cnpm_publish_time":1427679658873,"_hasShrinkwrap":false},"1.1.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"1.1.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1","read":"^1.0.5"},"devDependencies":{"mocha":"1.x"},"gitHead":"8f0eea3f957ca65d88064d9b437abf75bb29bfc6","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@1.1.0","scripts":{},"_shasum":"0576ec79c283eb5512b65808784de8fea0bb65b0","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"0576ec79c283eb5512b65808784de8fea0bb65b0","size":3762,"noattachment":false,"key":"/prompt-for/-/prompt-for-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-1.1.0.tgz"},"directories":{},"publish_time":1427678864386,"_cnpm_publish_time":1427678864386,"_hasShrinkwrap":false},"1.0.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"1.0.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"gitHead":"af1fd51776d7cb2d0e04d2029b5ab22f814b7c78","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@1.0.0","scripts":{},"_shasum":"8341a844d8308bb754d9d8c9a3570c8dc0c37566","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.16","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"8341a844d8308bb754d9d8c9a3570c8dc0c37566","size":3655,"noattachment":false,"key":"/prompt-for/-/prompt-for-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-1.0.0.tgz"},"directories":{},"publish_time":1427598719518,"_cnpm_publish_time":1427598719518,"_hasShrinkwrap":false},"0.5.1":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.5.1","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"gitHead":"cdd86710ab80bdd2b34d08ad9dbeeae4966dbf23","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.5.1","scripts":{},"_shasum":"1da48050a663640885e93fa284812700986ec1af","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"1da48050a663640885e93fa284812700986ec1af","size":3632,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.5.1.tgz"},"directories":{},"publish_time":1427519623956,"_cnpm_publish_time":1427519623956,"_hasShrinkwrap":false},"0.5.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.5.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"gitHead":"815b487875f73d32c98ee4889a5d63090cc81b09","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.5.0","scripts":{},"_shasum":"20031abbbac20e8bfb63327f6e30ccab77df224b","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"20031abbbac20e8bfb63327f6e30ccab77df224b","size":3590,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.5.0.tgz"},"directories":{},"publish_time":1412453428146,"_cnpm_publish_time":1412453428146,"_hasShrinkwrap":false},"0.4.1":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.4.1","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.4.1","dist":{"shasum":"26b888dbe7e479819e46f5c8c4c9254d3c64510b","size":3458,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.4.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1401237905341,"_cnpm_publish_time":1401237905341,"_hasShrinkwrap":false},"0.4.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.4.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.4.0","dist":{"shasum":"cfa2bded9367720082f696c64e8e779eafa03e4b","size":3440,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.4.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1398821557658,"_cnpm_publish_time":1398821557658,"_hasShrinkwrap":false},"0.3.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.3.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.3.0","dist":{"shasum":"e6e57c31267dbdbd34a9b00976d6ea20153a807d","size":3381,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1398819447993,"_cnpm_publish_time":1398819447993,"_hasShrinkwrap":false},"0.2.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.2.0","license":"MIT","main":"lib/index.js","dependencies":{"async":"^0.7.0","chalk":"^0.4.0","cli-prompt":"^0.3.2","component-type":"^1.0.0","date.js":"^0.2.0","debug":"^0.8.0","extend":"^1.2.1","max-component":"^1.0.0","pad-component":"0.0.1"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.2.0","dist":{"shasum":"1e55003f121c9a95550c3a0759f6fd527756f9c6","size":3278,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1398375898781,"_cnpm_publish_time":1398375898781,"_hasShrinkwrap":false},"0.1.0":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.1.0","license":"MIT","main":"lib/index.js","dependencies":{"date.js":"^0.2.0","extend":"^1.2.1","debug":"^0.7.4","async":"^0.2.10","chalk":"^0.4.0","pad-component":"0.0.1","cli-prompt":"^0.3.2","max-component":"^1.0.0","component-type":"^1.0.0"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.1.0","dist":{"shasum":"3ae8fde120b7b0cf08ab505ebf83066bfa840cbc","size":2552,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1395938872961,"_cnpm_publish_time":1395938872961,"_hasShrinkwrap":false},"0.0.3":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.0.3","license":"MIT","main":"lib/index.js","dependencies":{"date.js":"^0.2.0","extend":"^1.2.1","debug":"^0.7.4","async":"^0.2.10","chalk":"^0.4.0","pad-component":"0.0.1","cli-prompt":"^0.3.2","max-component":"^1.0.0","component-type":"^1.0.0"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.0.3","dist":{"shasum":"d194caa246f22e200708b88042b460ccd265b46c","size":2438,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.0.3.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1394605354750,"_cnpm_publish_time":1394605354750,"_hasShrinkwrap":false},"0.0.2":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.0.2","license":"MIT","main":"lib/index.js","dependencies":{"date.js":"^0.2.0","extend":"^1.2.1","debug":"^0.7.4","async":"^0.2.10","chalk":"^0.4.0","pad-component":"0.0.1","cli-prompt":"^0.3.2","max-component":"^1.0.0","component-type":"^1.0.0"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.0.2","dist":{"shasum":"2d3de24b09214a6ed9e56df2974c7f6430bec57b","size":2408,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1394402886525,"_cnpm_publish_time":1394402886525,"_hasShrinkwrap":false},"0.0.1":{"name":"prompt-for","description":"Prompt the user for a series of answers.","repository":{"type":"git","url":"git://github.com/segmentio/prompt-for.git"},"version":"0.0.1","license":"MIT","main":"lib/index.js","dependencies":{"date.js":"^0.2.0","extend":"^1.2.1","debug":"^0.7.4","async":"^0.2.10","chalk":"^0.4.0","pad-component":"0.0.1","cli-prompt":"^0.3.2","max-component":"^1.0.0","component-type":"^1.0.0"},"devDependencies":{"mocha":"1.x"},"bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"homepage":"https://github.com/segmentio/prompt-for","_id":"prompt-for@0.0.1","dist":{"shasum":"aa09592845712c4e50e29687709506762289f85b","size":2385,"noattachment":false,"key":"/prompt-for/-/prompt-for-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/prompt-for/download/prompt-for-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"segmentio","email":"team@segment.io"},"maintainers":[{"name":"ianstormtaylor","email":""},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1394328616013,"_cnpm_publish_time":1394328616013,"_hasShrinkwrap":false}},"readme":"\n# prompt-for\n\n  Prompt the user for a series of answers.\n\n## Installation\n\n    $ npm install prompt-for\n\n## Example\n\n```js\nvar prompt = require('prompt-for');\n\nvar schema = {\n  name: 'string',\n  siblings: 'number',\n  birthday: 'date',\n  deceased: 'boolean',\n  secret: 'password'\n};\n\nprompt(schema, function(err, answers){\n  assert(answers.name == 'Ian');\n  assert(answers.siblings == 2);\n  assert(answers.birthday.getTime() == 1343260800000);\n  assert(answers.deceased == false);\n  assert(answers.secret == '1234');\n});\n```\n\n  And if you're being lazy...\n\n```js\nprompt(['name', 'website'], function(err, answers){\n  assert(answers.name == 'Ian');\n  assert(answers.website == 'ianstormtaylor.com');\n});\n```\n\n  Or even...\n\n```js\nprompt('name', function(err, answers){\n  assert(answers.name == 'Ian');\n});\n```\n\n## Options\n\n  Define or overwrite default values...\n  \n  * Default `boolean` value is **false**\n  * Default `date` value is **now**\n  \n```js\nvar prompt = require('prompt-for');\n\nvar schema = {\n  name: {type:'string', default:'Ian'},\n  siblings: {type:'number', default:42},\n  birthday: {type:'date', default:'yesterday'},\n  deceased: {type:'boolean', default:true},\n  secret: {type:'password', default:'1234'}\n};\n\nprompt(schema, function(err, answers){\n  assert(answers.name == 'Ian');\n  // ...\n});\n```\n\n  Disable required for `string` and `number`...\n  \n  By default, empty or incorrect answers when asked a string or a number, will be asked again. Set `required` to **false** allows you to skip the question.\n  \n```js\nvar prompt = require('prompt-for');\n\nvar schema = {\n  name: {type:'string', required:false},\n  siblings: {type:'number', required:false}\n};\n\nprompt(schema, function(err, answers){\n  assert(answers.name == null);\n  assert(answers.number == null);\n});\n```\n\n## API\n\n#### prompt(schema, [options], fn)\n\n  Prompt the user with the given `schema` and optional `options`, then callback with `fn(err, answers)`. Options default to:\n\n    {\n      color: null,\n      pad: true,\n      prefix: '',\n      separator: ': '\n    }\n\n## License\n\n  MIT","_attachments":{},"homepage":"https://github.com/segmentio/prompt-for","bugs":{"url":"https://github.com/segmentio/prompt-for/issues"},"license":"MIT"}