{"name":"inquirer-checkbox-plus-prompt","version":"1.4.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":"2665e4a56f3d4d08abd8bfc7aed4ddb7ee170bf8","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.0","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Aniq98Uvje0GzWEqTK6DnVZWjraIkN7saB35L42r2efyURg+PgSBJG+c9ykwQJrW+q2cVYDTBnFh2AVD2n04IA==","shasum":"2de078e7cc0c78384b92e77c7316bac54f630d67","tarball":"http://registry-npm.ywwl.com/inquirer-checkbox-plus-prompt/download/inquirer-checkbox-plus-prompt-1.4.0.tgz","fileCount":9,"unpackedSize":357180,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+Gcokpo60uSCpt47KwsMeoA23nT2RxktCAG/GrY0FJgIgR9QHqAWU0juR7E58uNaIq1OuwoYSLZdJUrf3ksSw3kM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfiNTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraKg//e8pIfyJDjWJ1vxjx6+OOc3Cm1m51Y/mkdocN/+ch/7pJ5K2M\r\nzrrfIpmswHZZ4lBec3Y/RPxRkQMUzugPlH+MfcJf8gcdXzyruN8MQ4bf390L\r\n7eBZqpUxUailjF2xLvAy/6sjWN/+HHviiPxSyuYupCwYW6ioCMcZUVMYbr4B\r\n4WEKolZ/eEBuxSjhwfTBD2pM1z4TGfcSFHiiOyaAHLWRsZbVlLla1LxOQSkS\r\np2YZ94l5u0RRQGOz8V+V69pS5pG+NpKxwQlK+n6oQTosLob2zkd1uPTV9D2H\r\n7NCj3vlNddjoXILEDJJ3VVYEKzJ2JBIamQ+Ac2JgxcifLrIT2d9E79uh0Q7g\r\npgRbB9esvqjOSHAmx07GJmy164fnVaU5+5YbXxzZ5mz8ZAJ9JbIVjUbGtWk6\r\nMnBat6ivpCGUaGDXaG3XmCGniSQJVxtJU4a3qrMS/Zgrx4Qc4K+5tjEicoKx\r\nI7bsCxCKl9AqFMflORtSLNXzQCKVLaOysvll1BL4vW3rhlErYcemrf3AR0qJ\r\nxokpkptkpCTdIGRLfEa/EsD6tpVjip+Gv87uRZBtp3Nb0qYfr89ROgKfY01E\r\nqvCXUia04yDWZxE+KrcMtq0wqpqpKtaJ5XlyzRh9FspvTXiZ8W2fkws0/GL5\r\n6AeXwtmumSG6/SbnwNAlZ+TvZPDQ4OPqnKE=\r\n=XPF0\r\n-----END PGP SIGNATURE-----\r\n","size":253620,"noattachment":false,"key":"/inquirer-checkbox-plus-prompt/-/inquirer-checkbox-plus-prompt-1.4.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.4.0_1669210963492_0.41689111633530973"},"_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":1669210963749,"_cnpm_publish_time":1669210963749,"dist-tags":{"latest":"1.4.2"}}