{"name":"inquirer-checkbox-plus-prompt","version":"1.4.1","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","lodash":"^4.17.5","rxjs":"^6.6.7"},"devDependencies":{"fuzzy":"^0.1.3"},"peerDependencies":{"inquirer":"^8.2.5"},"gitHead":"4db59b3419141b3edc791c7e1339b224654885b2","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.4.1","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-uB8Jso+FqgbaxjnrYGGw+/Sy6+DpL6O34+E9KgYfeURjX14caUelM+nteKxckULzA/ZeNXZ3LAyOJCF/aMEYOQ==","shasum":"b4b61472e02bcc6d893d103a397bdf624575b99c","tarball":"http://registry-npm.ywwl.com/inquirer-checkbox-plus-prompt/download/inquirer-checkbox-plus-prompt-1.4.1.tgz","fileCount":9,"unpackedSize":357208,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGIddQ0DMechtvQB4x4zbukhCFjtPVckituLmLPdiqgAiAqXcbaWRXihew1xZhFhCF/qlIJgsU6dcjj/+JHApFdxA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfzEgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrK9g//Rx0di8CSef3silIaS0kmAF3EnKqCoK0jBOs74pCs39POOOKn\r\nh07X7fAzzFk4KFtV6tUCW6l+saDDJITj/QS1wh0O19LEhPszfPuSU7nS6IkD\r\nJgiPRtAFEmbthTkB5O5l560sP1jIwujCi5g7aXsOSTaIDMRUAUFeULnM0zDa\r\n5+d2MbKT9UTUXccdNWT0l98ulJwMFDTE7hG1dckumOTG2jnmDbqLbP0leHGf\r\nS72d/y4m0dMGHA57AjrMORJQ++IlEyvofEY7UN7RLeKO7wWXRWNJsK4UWY9W\r\nHkf1bimRJdGmeQHsVGFnij/MYNaExTHEUDJ/C/aXriSLI393ImUh93DLZxD9\r\n8vgonHni9exHnOF2pwxmyxQP3cgL34STjTv/1FXNH+jrIhq3tBNlaPSqGL3e\r\nUBbgc/UAith0e1Ig15Lvk7Mj0TvqlUhnpRbi83p+9rRXhBugAVwLMb3YmE5L\r\n8ddx0nlQjvMBX1sGi9dqIyzzzkax+SCixqU8EmfDkax7TaThcl8OvXLCPriB\r\nlHiY6o6j4DrcFVj/WwTlfZM0GLxCYLeqOIXYx7fXts3UkJoDf8xnCCzwaP4R\r\nOsJT3qj6LeKhPzt17kIqunPwLyqIhXonDDjEma/9n2S0M+43bw45e/nHviop\r\nkU1V6+uypkm6y8hTQ3R0gjrSFT1jX+jPJWI=\r\n=CAH1\r\n-----END PGP SIGNATURE-----\r\n","size":253625,"noattachment":false,"key":"/inquirer-checkbox-plus-prompt/-/inquirer-checkbox-plus-prompt-1.4.1.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.4.1_1669280032622_0.7273713418374073"},"_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":1669280032874,"_cnpm_publish_time":1669280032874,"dist-tags":{"latest":"1.4.2"}}