{"name":"inquirer-checkbox-plus-prompt","version":"1.4.2","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":{"chalk":"4.1.2","cli-cursor":"^3.1.0","figures":"^3.0.0","lodash":"^4.17.5","rxjs":"^6.6.7"},"devDependencies":{"fuzzy":"^0.1.3"},"peerDependencies":{"inquirer":"< 9.x"},"gitHead":"f4ac1f025ff363f04797a68caa54c6033e9ba843","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.2","_nodeVersion":"16.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-W8/NL9x5A81Oq9ZfbYW5c1LuwtAhc/oB/u9YZZejna0pqrajj27XhnUHygJV0Vn5TvcDy1VJcD2Ld9kTk40dvg==","shasum":"5a5bb42a3f4bca2f6f4e582d163733eb59f4b195","tarball":"http://registry-npm.ywwl.com/inquirer-checkbox-plus-prompt/download/inquirer-checkbox-plus-prompt-1.4.2.tgz","fileCount":9,"unpackedSize":357229,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAznzxgBT1GiBgZVlaLTq8Q3o5D646soXQNVaEAldlagIhAPUgAkVkTmgAF/KjeO2kfUcSrLn67wsyejvXBc6LIF/F"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzuOoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfJA//foC61bYxCwnNv91jG5cc2Cg983SDPsQNkMRjTgk4vl7HuB9w\r\nK1Te1CUh8gaNI+zfwOCZEfvZ67QrH4OOkdBTEuvQ+PVslvROJjKMyRITXHUF\r\ntuWTqDt1kK2mnu0F7lf3tUCVTmN21+UnbizHwQnrMJdiQs0bLiteDj55lrvx\r\nEjDgjbOVanI0aqb7RgU10gCTFvk9fozFqslZcHuSA/D6tSPI3CRqWD2gvlp7\r\n18r9t8p8NeMifUrNTJdRd1QzaG5ZaqXAng0M9DXj/2PFRdfVD8HNIy1pKrmi\r\n3F6dVZTYxjD9wjnBII9/tEQ+zZQEs/TCxEMXGPDPAYOAnAJDtYRjub16TbX3\r\nD2wXKHBu7QfXKch3crYlhkgyy9h0zu/XOmpAAhVdFs5NFWbrjmrc69wkqr3k\r\nRQS4rIYffUbquYslzxScOGQGfDOY8/YoFk5HHZ0JLeWdxZy4Q62DjPkxwNDg\r\n8/tGR6oQlgqS+f/eOoHGPTKtfcYFQxX6TurbcC7yMqjKjb7xzOhUrgg2jYO9\r\nNq8PfdJ/rLjdaz7lZxSQq3tTc/B5la1MG9SVmFkt22gfv2hK4HvQhz4P+prB\r\nnpcK2lAaqPWHJ7rIFCfe2y0OF2O+QstwuPLTDEimLcKpIUxID0MIH7ligTp0\r\n+5I1gZ68kSHTZfcWF+RptleHvPk4KyMhr/c=\r\n=wa2+\r\n-----END PGP SIGNATURE-----\r\n","size":253555,"noattachment":false,"key":"/inquirer-checkbox-plus-prompt/-/inquirer-checkbox-plus-prompt-1.4.2.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.2_1674503079777_0.22688468592232214"},"_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":1674503080055,"_cnpm_publish_time":1674503080055,"dist-tags":{"latest":"1.4.2"}}