{"name":"listr-input","version":"0.2.1","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":"354ee221b8dac065288693801ea0a1fc9d7ddd95","bugs":{"url":"https://github.com/SamVerschueren/listr-input/issues"},"homepage":"https://github.com/SamVerschueren/listr-input#readme","_id":"listr-input@0.2.1","_nodeVersion":"10.15.1","_npmVersion":"6.10.3","dist":{"integrity":"sha512-oa8iVG870qJq+OuuMK3DjGqFcwsK1SDu+kULp9kEq09TY231aideIZenr3lFOQdASpAr6asuyJBbX62/a3IIhg==","shasum":"ce735c34530683580388fdf9462ecfebd3b66126","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.2.1.tgz","fileCount":4,"unpackedSize":4658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSjbECRA9TVsSAnZWagAANjAP/RVNIIDfO3hbEz1gR9fx\nr2iM6Ur75MTd8dBC9B42fzUYUSR0GyzTe+fhHyvCAej82OjXP4tbsZDCU+pE\noPF8HNduOb8B/eo/K0W0qzSYoaT7mET0VFuRF1ZA264Q9oODQCk+TVepQZFG\nBH3vxlxtGmt5U14LRUncGUg6oZILSYAh5qNK8sukic55HXEyetEUUUzkjPeg\nOJ+a7Q47hdTMm5sGEh1zSlg2xLA4stSQBuqeWRbG05dJ58TPRbAoGk/h1FGO\nrxF5m5ui0w4vq7bYUqy6Qla9fSUnbE8t0lP+FNQKeStKsnY/VOgdcxMLebhx\ncj+T/YomWv3yQ5xESmgHJeZlWWwmJZhq9Lzf/QIF9WuE6VzcsNhEEtz/blpE\nVr8/OJPPBvfsjKD1MMs4wc+oFoJm1zClb5nZ84k/xAh70Pcci65W0V1uEGbs\nLZZrWl95B0i2nNgZUEJOVCr0FvNnVr9wazlVkbxZk379ZGg4PrIJctt24HfO\nCDwVNWCwzRBDRTVNMvkNV3CceGwG6zK/EilubHSQyfqGmyOdtT8pLJ4PsZ8h\n6KBI7UQsl4Qzq01Iwzd/RgdUT1hdPGhHURhPCxcfkEX2sufJLVKMTPxXJ2M5\noQgm5bah4Qyfa4rLaxrbN3qrpZF6m0MtkR0P0PPm4uN+3PrUqyzjrKKZItLO\nAkMG\r\n=LQJ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeP99jDr+6TYCeidOP9lXBaAuW9DFO+mY0sM+yXUL99AiEA9UsiQBjiGaglTtp/73yKkubxnE2Zy0zN3EJ9o7d+wuk="}],"size":2335,"noattachment":false,"key":"/listr-input/-/listr-input-0.2.1.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.1_1581921988179_0.6402664326460441"},"_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":1581921988351,"_cnpm_publish_time":1581921988351,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}