{"_id":"to-choices","_rev":"81794","name":"to-choices","description":"Easily create a normalized inquirer choices question. Supports all of the `choices` question types: checkbox, list, rawlist, expand","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:26:05.000Z","created":"2015-11-29T20:47:21.604Z","0.2.0":"2016-02-27T20:51:45.492Z","0.1.3":"2016-02-27T17:40:04.519Z","0.1.1":"2015-11-29T20:51:31.577Z","0.1.0":"2015-11-29T20:47:21.604Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/generate/to-choices.git"},"versions":{"0.2.0":{"name":"to-choices","description":"Easily create a normalized inquirer choices question. Supports all of the `choices` question types: checkbox, list, rawlist, expand","version":"0.2.0","homepage":"https://github.com/generate/to-choices","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/generate/to-choices.git"},"bugs":{"url":"https://github.com/generate/to-choices/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ansi-gray":"^0.1.1","mixin-deep":"^1.1.3"},"devDependencies":{"gulp-format-md":"^0.1.7","inquirer2":"^0.1.1","mocha":"*"},"keywords":["array","ask","choice","choices","cli","inquirer","prompt","question"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["question-store","answer-store"]},"reflinks":["inquirer2","verb"],"lint":{"reflinks":true}},"gitHead":"504c24e2c94c22c791e14ce2fae03b2b90f77849","_id":"to-choices@0.2.0","_shasum":"22e7e75a07d697d7e4cecbd56b1bf03c15654d73","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"22e7e75a07d697d7e4cecbd56b1bf03c15654d73","size":3303,"noattachment":false,"key":"/to-choices/-/to-choices-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-choices/download/to-choices-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/to-choices-0.2.0.tgz_1456606304177_0.1433246429078281"},"directories":{},"publish_time":1456606305492,"_cnpm_publish_time":1456606305492,"_hasShrinkwrap":false},"0.1.3":{"name":"to-choices","description":"Generate an inquirer choices question from an array.","version":"0.1.3","homepage":"https://github.com/generate/to-choices","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/generate/to-choices.git"},"bugs":{"url":"https://github.com/generate/to-choices/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ansi-gray":"^0.1.1","isobject":"^2.0.0","mixin-deep":"^1.1.3"},"devDependencies":{"gulp-format-md":"^0.1.7","inquirer2":"^0.1.1","mocha":"*"},"keywords":["array","ask","choice","choices","cli","inquirer","prompt","question"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["question-store","answer-store"]},"reflinks":["inquirer2","verb"],"lint":{"reflinks":true}},"gitHead":"925a9952370ff14b809e7e8c077dc119e070d2af","_id":"to-choices@0.1.3","_shasum":"5b8c2e0dc7e0672353b9cf63cc7448d2d302cd2d","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"5b8c2e0dc7e0672353b9cf63cc7448d2d302cd2d","size":2896,"noattachment":false,"key":"/to-choices/-/to-choices-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-choices/download/to-choices-0.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/to-choices-0.1.3.tgz_1456594801518_0.6354792090132833"},"directories":{},"publish_time":1456594804519,"_cnpm_publish_time":1456594804519,"_hasShrinkwrap":false},"0.1.1":{"name":"to-choices","description":"Generate an inquirer choices question from an array.","version":"0.1.1","homepage":"https://github.com/generate/to-choices","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/generate/to-choices.git"},"bugs":{"url":"https://github.com/generate/to-choices/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ansi-gray":"^0.1.1","extend-shallow":"^2.0.1","isobject":"^2.0.0"},"devDependencies":{"inquirer":"^0.11.0","mocha":"*"},"keywords":["array","ask","choice","choices","cli","inquirer","prompt","question"],"verb":{"related":{"list":["question-store","answer-store"]}},"gitHead":"fd0062ff2a0725e3c6361c4c39d432891b23760c","_id":"to-choices@0.1.1","_shasum":"c67c638682fe26038e82730c2704c6f55717f1a4","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c67c638682fe26038e82730c2704c6f55717f1a4","size":2660,"noattachment":false,"key":"/to-choices/-/to-choices-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-choices/download/to-choices-0.1.1.tgz"},"directories":{},"publish_time":1448830291577,"_cnpm_publish_time":1448830291577,"_hasShrinkwrap":false},"0.1.0":{"name":"to-choices","description":"Generate an inquirer choices question from an array.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/to-choices","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/to-choices.git"},"bugs":{"url":"https://github.com/jonschlinkert/to-choices/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"ansi-gray":"^0.1.1","extend-shallow":"^2.0.1","isobject":"^2.0.0"},"devDependencies":{"inquirer":"^0.11.0","mocha":"*"},"verb":{"related":{"list":["question-store","answer-store"]}},"gitHead":"9c5726925e8a4a20266cc93a5439a6eb8e8d2d2d","_id":"to-choices@0.1.0","_shasum":"ab20072bbe54b633f28df7608365cd807b1cb2d8","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ab20072bbe54b633f28df7608365cd807b1cb2d8","size":2572,"noattachment":false,"key":"/to-choices/-/to-choices-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-choices/download/to-choices-0.1.0.tgz"},"directories":{},"publish_time":1448830041604,"_cnpm_publish_time":1448830041604,"_hasShrinkwrap":false}},"readme":"# to-choices [![NPM version](https://img.shields.io/npm/v/to-choices.svg)](https://www.npmjs.com/package/to-choices) [![Build Status](https://img.shields.io/travis/generate/to-choices.svg)](https://travis-ci.org/generate/to-choices)\n\n> Easily create a normalized inquirer choices question. Supports all of the `choices` question types: checkbox, list, rawlist, expand\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install to-choices --save\n```\n\n## Heads up!\n\n**Breaking changes made in v02.0!**\n\nThe main export now returns a function that takes an options object and, when called, returns the `toChoices` function to be usef for creating the question object.\n\n## Usage\n\n```js\nvar toChoices = require('to-choices')([options]);\n\nvar question = toChoices('foo', ['a', 'b', 'c']);\nconsole.log(question);\n```\n\nThe default `type` is `checkbox`, so the above code results in:\n\n```js\n{ type: 'checkbox',\n  name: 'foo',\n  message: 'foo',\n  choices:\n   [ { name: 'all', value: ['a', 'b', 'c'] },\n     { type: 'separator', line: '\\u001b[90m————\\u001b[39m' },\n     { name: 'a' },\n     { name: 'b' },\n     { name: 'c' } ] }\n```\n\n## Supported question types\n\nIn addition to `checkbox`, the following types are also supported:\n\n* `expand`\n* `list`\n* `rawlist`\n\nSignature and all params are the same. Just pass the `type` to the main export.\n\n**Example**\n\nCreate a `list` question:\n\n```js\nvar toQuestions = require('to-choices')({type: 'list'});\nvar question = toChoices('favorite color?', [\n  'red',\n  'blue',\n  'green'\n]);\nconsole.log(question);\n```\n\nResults in:\n\n```js\n{ type: 'list',\n  choices: [ 'red', 'blue', 'green' ],\n  name: 'favorite color',\n  message: 'favorite color' }\n```\n\nSee the [inquirer2](https://github.com/jonschlinkert/inquirer2) documentation for more details about question objects and supported properties.\n\n## Related projects\n\n* [answer-store](https://www.npmjs.com/package/answer-store): Store answers to user prompts, based on locale and/or current working directory. | [homepage](https://github.com/jonschlinkert/answer-store)\n* [question-store](https://www.npmjs.com/package/question-store): Ask questions, persist the answers. Basic support for i18n and storing answers based on current… [more](https://www.npmjs.com/package/question-store) | [homepage](https://github.com/jonschlinkert/question-store)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-choices/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the [MIT license](https://github.com/generate/to-choices/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 27, 2016._","_attachments":{},"homepage":"https://github.com/generate/to-choices","bugs":{"url":"https://github.com/generate/to-choices/issues"},"license":"MIT"}