{"name":"inquirer-checkbox-plus-prompt","version":"1.3.0","description":"Checkbox with autocomplete and other additions for Inquirer","main":"index.js","repository":{"type":"git","url":"git+https://github.com/faressoft/inquirer-checkbox-plus-prompt.git"},"keywords":["inquirer","checkbox","autocomplete","search","filter","searchable","highlight","source","api","promise","command","prompt","stdin","cli","tty","menu"],"author":{"name":"Mohammad Fares","email":"faressoft.com@gmail.com"},"license":"MIT","dependencies":{"cli-cursor":"^3.1.0","figures":"^3.0.0","inquirer":"^8.2.5","lodash":"^4.17.5","rxjs":"^6.6.7"},"devDependencies":{"fuzzy":"^0.1.3"},"gitHead":"234023e87d013fb0620971221bd52f31187954ec","bugs":{"url":"https://github.com/faressoft/inquirer-checkbox-plus-prompt/issues"},"homepage":"https://github.com/faressoft/inquirer-checkbox-plus-prompt#readme","_id":"inquirer-checkbox-plus-prompt@1.3.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-aOYUfkrTeGVvIKvaQfnQUUVw66Ufd29Nti5W7ESOm09K3mHv+FNlRYUugalrbM9eEdmV3ffAQiaf+iuV8aJKxg==","shasum":"488eff7cb8b07b1c11a437c0324a977af5e30299","tarball":"http://registry-npm.ywwl.com/inquirer-checkbox-plus-prompt/download/inquirer-checkbox-plus-prompt-1.3.0.tgz","fileCount":8,"unpackedSize":103987,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUfWm3QQFW4VD34N4vXICrQvXC7mj1JViuAMnjeImS4wIhAPt0dZZ0x12yKw1Q9rvXx/ncLcunuuB64wNgbdnTD8OT"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfh4QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsFw//QTb0yLwszKMBDcqz1veZ8qPgOFjmcsVmhsBiRZYUA4cnQOxL\r\nTS1WJyxgvu8d3kVIxFkUjglVn6yeFv+Kw5aqx+uX9EoAxOmd/gxUg9RnhNI1\r\nJRoovWameG2lmB+UDg98FNhDl5kHhqhz1f0Ksmqo1NO7rY6+y0bNekF4APiT\r\nwtSAsyeg7rbqCyZRc9V3N1bBavpmlR4EIPVgthmCWtojwwfJ2JoLwM/wb4vw\r\n1tVaAe8BLieM9fefCh+JrbumvoattLWPRDzoeWRyP6VAHVdY0b0x4/sBvb49\r\nZvBxWm/ozd7xieH2/OQVtkuTOtyQpbr7P+58ub5QrjaO9N6dPz9Dvvu6z09x\r\nSb0xCwJ7HMJITvKhqA24bA19vAhGr1Qf9qeDHPI0eTP0d/LRGfti4C43xAXG\r\nEBbiTbuv6aIUMQQLYtHWayZZ8o6/z/6B8vFrzOT8xJyZ5a1xMJQnk93H+dg5\r\nb1xTfMrhtWdgzGJiWG7X2gOlDTfX4H/MXw6xFR5nCgw7fpQRRNfrwg7+3lz1\r\n7P8UZ0LZ8zVMuT7VOUBHNeRVxbiDWt2Ize8YusvmJCZY3pdQxpxD1FnpzbdD\r\nK1was4tCTnRe5RpUTqmuFfnAN/VnfWM6H950YguuBwLHT7lUBbLAIre7ccU6\r\nfUTVv4gg5+/nNnlVcXOQSRITNXsSt3H02Bk=\r\n=e29K\r\n-----END PGP SIGNATURE-----\r\n","size":52979,"noattachment":false,"key":"/inquirer-checkbox-plus-prompt/-/inquirer-checkbox-plus-prompt-1.3.0.tgz"},"_npmUser":{"name":"faressoft","email":"faressoft.com@gmail.com"},"directories":{},"maintainers":[{"name":"faressoft","email":"faressoft.com@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inquirer-checkbox-plus-prompt_1.3.0_1669209616294_0.8686473096937126"},"_hasShrinkwrap":false,"readme":"# Inquirer Checkbox Plus Prompt\n\nA plugin for [Inquirer](https://github.com/SBoudrias/Inquirer.js), similar to the original checkbox with extra features.\n\n[![npm](https://img.shields.io/npm/v/inquirer-checkbox-plus-prompt.svg)](https://www.npmjs.com/package/inquirer-checkbox-plus-prompt)\n[![npm](https://img.shields.io/npm/l/inquirer-checkbox-plus-prompt.svg)](https://github.com/faressoft/inquirer-checkbox-plus-prompt/blob/master/LICENSE)\n\n<p align=\"center\">\n  <img width=\"500\" src=\"/demo.gif?raw=true\">\n  <br>\n  <span>The animated GIF is made by <a href=\"https://github.com/faressoft/terminalizer\">Terminalizer</a></span>\n</p>\n\n# Installation\n\n```\nnpm install inquirer-checkbox-plus-prompt\n```\n\n# Usage\n\nYou can name it with any name other than `checkbox-plus`, just change the string `'checkbox-plus'` to anything else.\n\n```js\ninquirer.registerPrompt('checkbox-plus', require('inquirer-checkbox-plus-prompt'));\n\ninquirer.prompt({\n  type: 'checkbox-plus',\n  ...\n})\n```\n\n# Options\n\nTakes `type`, `name`, `message`, `source`[, `filter`, `validate`, `default`, `pageSize`, `highlight`, `searchable`] properties.\n\nThe extra options that this plugin provides are:\n\n* **source**: (Function) a method that called to return a promise that should be resolved with a list of choices in a similar format as the `choices` option in the original `checkbox` prompt of `Inquirer`.\n* **highlight**: (Boolean) if `true`, the current selected choice gets highlighted. Default: `false`.\n* **searchable**: (Boolean) if `true`, allow the user to filter the list. The `source` function gets called everytime the search query is changed. Default: `false`.\n\n# Example\n\nCheck [example.js](/example.js?raw=true) for a more advanced example.\n\n```js\nvar inquirer = require('inquirer');\nvar fuzzy = require('fuzzy');\n\ninquirer.registerPrompt('checkbox-plus', require('./index'));\n\nvar colors = ['red', 'green', 'blue', 'yellow'];\n\ninquirer.prompt([{\n  type: 'checkbox-plus',\n  name: 'colors',\n  message: 'Enter colors',\n  pageSize: 10,\n  highlight: true,\n  searchable: true,\n  default: ['yellow', 'red'],\n  source: function(answersSoFar, input) {\n\n    input = input || '';\n\n    return new Promise(function(resolve) {\n\n      var fuzzyResult = fuzzy.filter(input, colors);\n\n      var data = fuzzyResult.map(function(element) {\n        return element.original;\n      });\n\n      resolve(data);\n      \n    });\n\n  }\n}]).then(function(answers) {\n\n  console.log(answers.colors);\n\n});\n```\n\n# License\n\nThis project is under the MIT license.\n","publish_time":1669209616514,"_cnpm_publish_time":1669209616514,"dist-tags":{"latest":"1.4.2"}}