{"name":"listr-input","version":"0.2.0","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":">=6"},"scripts":{"test":"xo && ava"},"keywords":["listr","input","question","message"],"dependencies":{"inquirer":"^7.0.0","inquirer-autosubmit-prompt":"^0.2.0","rxjs":"^6.5.3","through":"^2.3.8"},"devDependencies":{"ava":"^0.23.0","xo":"^0.24.0"},"gitHead":"d438f298b7257cf604bdac7eec2aa2f6233448e5","bugs":{"url":"https://github.com/SamVerschueren/listr-input/issues"},"homepage":"https://github.com/SamVerschueren/listr-input#readme","_id":"listr-input@0.2.0","_nodeVersion":"10.15.1","_npmVersion":"6.10.3","dist":{"integrity":"sha512-k5cKZllYKKFyTe/B6H4m9NWm/Px49OVvZXT28khQ9xrZQMYADh4zqMk7507/0Jdbg0tPjS0xTbvfrX9Yn6b7Yw==","shasum":"3a038978fa14a3392dccdda4358777f970fe24c7","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.2.0.tgz","fileCount":4,"unpackedSize":4660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkaQuCRA9TVsSAnZWagAAE/EP/RGo+fGZVMwf7J2DVFci\ng8p2JZjXValLtvjB73AgYkPVCo1eKPYU5kyZ96V2wRHK11PI2ezRd6rWP5I5\nZH+89IC5f235kKn7Qy4KOE/5b5GB88tLeCpj7tw0x1+f+2bbsao96BzZmsCR\nyWM5KyRP8wZW4VUnoLRkdcUjpPRE0zjFZEYD1OOYoqGMMbfToVle1VghsIuY\njLBZKbF1Bob/F8zIHpZjquc2jH7jYli1AyFt940VvHePNloM5bdOtRoi2+ec\nhx0bN2QSuO4/zN8aHavTYVYs9UGvMlBcz2AI50gqmaVWxOo3HiS3+LQFyGJw\nmzABs/pOKI/ta4u37YmahYG3Y8vyEg5n2iQvzTruiXZZhKUZi3VE6sUQ5hWP\nIb9WI5cnYNp7SyNgSoRs7AG1N9vD4CNqQAwcK6p/ORMTLarwLYd1Yic1Ys2/\naQMA+a+AbIeqg2AV0kXz3nMY8N9HmtHX9ZgOEvlFDcwQZQcX1bnfTZtYHxh0\n/g8MU7YFC3Ulg6rayxidseEDo8pAEKXMF2WowPG/W56eedtgPEwSuDBJT08Q\npdULJiwnmg5RbVpIbtAkyAADsAXasIu1oChwKL15GmHVkl+vbGgSJ5rTSsww\nSfToYrxhgVYCV4B8pczHZ8xx8lJpZMFYkfa6xLUqOjYDMejuXksS32GOpq2L\nN0cq\r\n=FfhN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLPfaWR0e/lck8s1x5AtDXv2cUaHZp0POL1RQwzKvEqwIgTpTyzpiI35SqupYCjjEta3GCq8ZO5gLikpNG9vmpqc8="}],"size":2336,"noattachment":false,"key":"/listr-input/-/listr-input-0.2.0.tgz"},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/listr-input_0.2.0_1569825837548_0.3714786430597907"},"_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":1569825837771,"_cnpm_publish_time":1569825837771,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}