{"name":"listr-input","version":"0.1.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":">=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":"87cbc8793d01968c83df1859a6c197e27e4ed565","bugs":{"url":"https://github.com/SamVerschueren/listr-input/issues"},"homepage":"https://github.com/SamVerschueren/listr-input#readme","_id":"listr-input@0.1.1","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"dist":{"integrity":"sha512-c3+e+9qe5MYOinzTwbp6F+CQSVtdQmxJaI0iNyQrWkfWdP37n+2zWJ2g9h8glcXWJYAqacjvNbQrKvYUCBm6vA==","shasum":"d34d99beccce1863661eee4886a256246919bbf8","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnzJXfgOspzdNvBOiYX0EqmhcePgCWW/U8US/4JyrscgIgY2I5fZvZwdrHCOyj+s5D3X2kOScVa+ifuuM3nUYyTAI="}],"size":2232,"noattachment":false,"key":"/listr-input/-/listr-input-0.1.1.tgz"},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/listr-input-0.1.1.tgz_1510296648512_0.23287137458100915"},"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":1510296649389,"_cnpm_publish_time":1510296649389,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}