{"name":"inquirer-checkbox-plus-prompt","version":"1.2.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":"^2.1.0","figures":"^2.0.0","lodash":"^4.17.5"},"devDependencies":{"fuzzy":"^0.1.3"},"peerDependencies":{"inquirer":"^5.1.0"},"gitHead":"dee0ca140213b510cdbc1d643983cf186f8e69ea","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.2.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-njrl6FT3CcqliXqPUL3QT/Q7dSipGflhVyKUu3Lrah8nKccXmeG9XYfxolc7WJgElNW4nFe10pY4JV3Gq1SJ6Q==","shasum":"531ad2f106bbd363a608f47d56c51b1d8695831f","tarball":"http://registry-npm.ywwl.com/inquirer-checkbox-plus-prompt/download/inquirer-checkbox-plus-prompt-1.2.0.tgz","fileCount":8,"unpackedSize":103680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtm86HKDYrTfHYfA+fevnUL7n3RZXKTL1ThM0Fa283vAiEAydL9UhcUthBBsgtTwjuFtd/bxLrMOtiH58PuaBbrIew="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje6IdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpK4g//XLXezIDQaIqXmVCv6TGcXR8RzGpTruT4tDjvXhGxsJcy9aWj\r\n1KtjloCexZDGUrkDXU2jBzzRCQXpeg7xn042SEha+s2kDciD1t72SqxMfy0k\r\nID093duFcLZ456Vt8OOCBV6MZJQy+WYN18ngwebhxlQk3FKxuZxzruQegZSS\r\nq+FL6lURdAQhHaq1cI8JlnSBlVdWK1SqcXdJVAIjn+E4T6L+8g3+oTTI7Hqh\r\nn5Ol1uzS3BbIj80apoY5P7pSyJun7tttSb2rTuDyTa2DPa54hYP8/PTFkeBT\r\nU29rBAiRmxUXEmncnGsoZI/aj1a8zPbd+bFqT4cFJM/z2YOY29AuGMsn5iS9\r\nkhu04ZEx6jd7XANeehjCZXAQlBMU3gUK0vGGf4QQYIjJ/dsqPl2te/v+v9PT\r\nEcN37L6uWXd1EXO52NjKoFa/VlSLcxTGlnvVXIpTLfUNjDJ0hwfRxKQkCeoB\r\n9HqRPNi63QqdjeYZTlX6N8P728Jl8jYuxicQislLRxGEmEmjdG23l0KRsS1c\r\nlojP1IdF1msGSTlhaXXjXDEQj5FCSjV9RHBoJR7ui90z+gD4x4Lmb8WXrP9x\r\nAPodjMEm0I6ka/wkcZlgaxd/DXjQuWT6ZRHGySXrrp5VvIlng1DyGbM8xaNX\r\nBJhqKdsPBVGJLiuqF1oliNU54FwN9ozQ7FU=\r\n=jz5S\r\n-----END PGP SIGNATURE-----\r\n","size":52924,"noattachment":false,"key":"/inquirer-checkbox-plus-prompt/-/inquirer-checkbox-plus-prompt-1.2.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.2.0_1669046813307_0.2673832813071306"},"_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":1669046813507,"_cnpm_publish_time":1669046813507,"dist-tags":{"latest":"1.4.2"}}