{"name":"listr-input","version":"0.1.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":">=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":"c00c4025098f6030b55c8bc88a8477a7368038db","bugs":{"url":"https://github.com/samverschueren/listr-input/issues"},"homepage":"https://github.com/samverschueren/listr-input#readme","_id":"listr-input@0.1.0","_shasum":"69043322760a77bc8f25297f4d7e3c2364f7937f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"samverschueren","email":"sam.verschueren@gmail.com"},"dist":{"shasum":"69043322760a77bc8f25297f4d7e3c2364f7937f","tarball":"http://registry-npm.ywwl.com/listr-input/download/listr-input-0.1.0.tgz","integrity":"sha512-i4zok5KbwNmdNEoW+F+ftlsSsUQEbam2Pmn8aBy5FSJqzBVjibwgla1jJCTqFKIdMA6s5p3kMf5TWE6PBYeZ+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnBzxCOEkCRaVNu50Oj9lsenbex8Iwo6A9sEmWDLMKUAiBgZTU0gKAUUJYOVt/3mGLeRR1mUSgMAuJs4y9L443hhQ=="}],"size":2219,"noattachment":false,"key":"/listr-input/-/listr-input-0.1.0.tgz"},"maintainers":[{"name":"samverschueren","email":"sam.verschueren@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/listr-input-0.1.0.tgz_1510258326979_0.515693892724812"},"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":1510258327040,"_cnpm_publish_time":1510258327040,"dist-tags":{"latest":"0.2.1","[object Object]":"0.1.1"}}