{"name":"listr-input","version":"0.1.2","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":"2b64451cf44fbb290420ba38c23bd34c48ca0d54","bugs":{"url":"https://github.com/SamVerschueren/listr-input/issues"},"homepage":"https://github.com/SamVerschueren/listr-input#readme","_id":"listr-input@0.1.2","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"dist":{"integrity":"sha512-GQl3txLCcuKzmkYxMjZ3idiICyyjxZTfDz2k92LXU3byxY1nz249iKbfMKvSmWYUHs85TqWYZCkMJ316OKjTfA==","shasum":"628b68f47dc8809bce24a782be8520a723cfb611","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.1.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIASSuUPECwBlCQhB2rNCuKSTBz40UzvYS9VDcyvwwarrAiEA/7yifd3jfewjyvQ5wa5nN5s/0l6O3iV82/SHg2z7c1Y="}],"size":2234,"noattachment":false,"key":"/listr-input/-/listr-input-0.1.2.tgz"},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/listr-input-0.1.2.tgz_1510300598669_0.9092624117620289"},"directories":{},"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":1510300599657,"_cnpm_publish_time":1510300599657,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}