{"name":"listr-input","version":"0.1.3","description":"Input module for Listr","license":"MIT","repository":{"type":"git","url":"git+https://github.com/SamVerschueren/listr-input.git"},"author":{"name":"Sam Verschueren","email":"sam.verschueren@gmail.com","url":"github.com/SamVerschueren"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["listr","input","question","message"],"dependencies":{"inquirer":"^3.3.0","rxjs":"^5.5.2","through":"^2.3.8"},"devDependencies":{"ava":"^0.23.0","xo":"*"},"gitHead":"065c44a6722eab192fa4b853a22e0009388faf38","bugs":{"url":"https://github.com/SamVerschueren/listr-input/issues"},"homepage":"https://github.com/SamVerschueren/listr-input#readme","_id":"listr-input@0.1.3","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"dist":{"integrity":"sha512-dvjSD1MrWGXxxPixpMQlSBmkyqhJrPxGo30un25k/vlvFOWZj70AauU+YkEh7CA8vmpkE6Wde37DJDmqYqF39g==","shasum":"0c313967b6d179ebe964a81e9363ce2a5a39d25c","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.1.3.tgz","fileCount":4,"unpackedSize":4271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7Hu3JtgxsQrWp2puKRCmAX0YHGYT/BLbOigRGX/8pWgIhALnw9aEcSugmqJRji0xGtn3njzGoiYxb+ll8Xoq/fBJ8"}],"size":2239,"noattachment":false,"key":"/listr-input/-/listr-input-0.1.3.tgz"},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/listr-input_0.1.3_1518897110517_0.5948957990774213"},"_hasShrinkwrap":false,"readme":"# listr-input [![Build Status](https://travis-ci.org/SamVerschueren/listr-input.svg?branch=master)](https://travis-ci.org/SamVerschueren/listr-input)\n\n> Input module for [Listr](https://github.com/SamVerschueren/listr)\n\n\n## Install\n\n```\n$ npm install --save listr-input\n```\n\n\n## Usage\n\n```js\nconst Listr = require('listr');\nconst input = require('listr-input');\nconst got = require('got');\n\nconst list = new Listr([\n\t{\n\t\ttitle: 'Retrieving data',\n\t\ttask: () => input('Credentials', {\n\t\t\tsecret: true,\n\t\t\tvalidate: value => value.length > 0,\n\t\t\tdone: credentials => got('https://myapi.com', {\n\t\t\t\theaders: {\n\t\t\t\t\t'Authorization': `Bearer ${credentials}`\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n]);\n\nlist.run();\n```\n\n\n## API\n\n### input(question, [options])\n\nReturns an Observable which asks for user input.\n\n#### question\n\nType: `string`\n\nQuestion to ask.\n\n#### options\n\n##### default\n\nType: `string`\n\nDefault value to use if nothing is entered.\n\n##### validate\n\nType: `function`\n\nFunction which accepts the provided value. Should return `true` if the value is valid, `false` otherwise.\n\n##### secret\n\nType: `boolean`<br>\nDefault: `false`\n\nMark the input as secret.\n\n##### done\n\nType: `function`\n\nFunction that will be invoked when the user has answered the question.\n\n##### autoSubmit\n\nType: `function`\n\nFunction which accepts the provided value. If returns `true` then the value will be submitted automatically.\n\n\n\n## License\n\nMIT © [Sam Verschueren](https://github.com/SamVerschueren)\n","publish_time":1518897110577,"_cnpm_publish_time":1518897110577,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}