{"_id":"@apitoday/inquirer-autocomplete-prompt","_rev":"1-16ed3b5634e67272f5b88406c2eee9d6","name":"@apitoday/inquirer-autocomplete-prompt","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@apitoday/inquirer-autocomplete-prompt","description":"Autocomplete prompt for inquirer","version":"1.1.0","repository":{"type":"git","url":"git+ssh://git@github.com/raymondfeng/inquirer-autocomplete-prompt.git"},"publishConfig":{"registry":"http://registry.npmjs.org","access":"public"},"author":{"name":"Martin Hansen","email":"martin@martinhansen.no"},"contributors":[{"name":"Karl Horky","email":"karl.horky@gmail.com","url":"https://github.com/karlhorky"},{"name":"Raymond Feng","email":"enjoyjava@gmail.com","url":"https://github.com/raymondfeng"}],"engines":{"node":">=10"},"license":"ISC","devDependencies":{"chai":"^4.2.0","eslint":"^6.8.0","flow-bin":"^0.123.0","fuzzy":"^0.1.3","inquirer":"^7.1.0","lodash":"^4.17.15","mocha":"^7.1.2","nyc":"^15.0.1","prettier":"^2.0.5","sinon":"^9.0.2"},"dependencies":{"ansi-escapes":"^4.3.1","chalk":"^4.0.0","figures":"^3.2.0","run-async":"^2.4.0"},"peerDependencies":{"inquirer":"^5.0.0 || ^6.0.0 || ^7.0.0"},"scripts":{"lint":"npm run prettier:check && npm run eslint","lint:fix":"npm run eslint:fix && npm run prettier:fix","eslint":"eslint --report-unused-disable-directives --cache .","eslint:fix":"npm run eslint -- --fix","prettier:cli":"prettier \"**/*.js\" \"**/*.md\"","prettier:check":"npm run prettier:cli -- --check","prettier:fix":"npm run prettier:cli -- --write","pretest":"npm run-script lint && flow","test":"nyc mocha test/spec --scripts-prepend-node-path","posttest":"nyc check-coverage --statements 85 --branches 85 --functions 85 --lines 85 && rm -rf coverage"},"gitHead":"f71e34098d1e2b69166b4d1f15cf226f33f8943f","bugs":{"url":"https://github.com/raymondfeng/inquirer-autocomplete-prompt/issues"},"homepage":"https://github.com/raymondfeng/inquirer-autocomplete-prompt#readme","_id":"@apitoday/inquirer-autocomplete-prompt@1.1.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ghhjnXwR1wFkvksCvfrGNxy+cZfAWopunbHgNGgBdHP0yznup9YEzbD2258fIA5C5tGS7STVI9SQqBaIWod2ww==","shasum":"f517eef4a329cab8c2df8ddfedf30cccc1fabbf6","tarball":"https://registry.npmjs.org/@apitoday/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-1.1.0.tgz","fileCount":5,"unpackedSize":19234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepiePCRA9TVsSAnZWagAAJGYQAIKUgydRTg3iJjNRKl5o\n0/seWjCRwiD2EGCpmQtelc0mzCykLVlxX8/KugKtb27qGm2beeM4cpJLAbjv\nHkrwUTGeb6xohnEREIBuD/1Q4JcuDWNHZDlr2kmqV5PKv/dAx1fGJX8UHfO/\nfsdJtKjpq15ZHWqXn+Nmc6UmfV9/Kadc8wH3eEZpueQ83005tNlG1KUSIprN\nrv2cx+10UCl7+xif+GanKDYm7Z4gzFObiizeHSRGtfYNuxBId13EgipXNEbb\nefXua9CzR9FSG4reFjY/eJNkqdbSyMCbhQe0XFJJpDGaPcaVGjT9x+Kf9yhB\nrQzxRTJrizG3ey0E6R/qhH3Ji0IQ35+wRRGpF8A+7a6Sz+sdXqTHi5XAOzXp\nO0uZtwuzJb7U279EkMXzC9Iv+lxQYKZ7w5lyJ1GKG/3rC+Q++y4zdVCCnMFs\nyhBiMbMTwrrMvslt5/qeGGdreELY7/T11vfVfNKjyKHBaVsNb2Q1Snc0Dl/U\naeSc8dZkceduh0Aw2SroYXhCG4/KbxWCcv1iFpdcPeMW76jp3TX25zkmGGEh\n/EEPM0QID8XTfL/hSqTHdy43tjQMZ50qmhQeGxje569un2CPUj+0x1HJIMxJ\nrgaIjnv4Gd6rxlzh6NQrYzA1CEDqr8Q9kpgRdbj48DSbUQ4k6Megp3Bc3J9M\nXBo4\r\n=Uwea\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDEEJqUdG8Bu6hAUiqykXVhf/yvyx/Chmmh+JlDdsh9AiA+j66jIi9mRUttHzMJGW74478v79IRvQZTuXPhgWnSuA=="}]},"maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"}],"_npmUser":{"name":"rfeng","email":"enjoyjava@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inquirer-autocomplete-prompt_1.1.0_1587947407199_0.8578513192314867"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-27T00:30:06.936Z","1.1.0":"2020-04-27T00:30:07.316Z","modified":"2022-04-04T14:38:35.088Z"},"maintainers":[{"name":"rfeng","email":"enjoyjava@gmail.com"}],"description":"Autocomplete prompt for inquirer","homepage":"https://github.com/raymondfeng/inquirer-autocomplete-prompt#readme","repository":{"type":"git","url":"git+ssh://git@github.com/raymondfeng/inquirer-autocomplete-prompt.git"},"contributors":[{"name":"Karl Horky","email":"karl.horky@gmail.com","url":"https://github.com/karlhorky"},{"name":"Raymond Feng","email":"enjoyjava@gmail.com","url":"https://github.com/raymondfeng"}],"author":{"name":"Martin Hansen","email":"martin@martinhansen.no"},"bugs":{"url":"https://github.com/raymondfeng/inquirer-autocomplete-prompt/issues"},"license":"ISC","readme":"# @raymondfeng/inquirer-autocomplete-prompt\n\nThis is a folk from [mokkabonna/inquirer-autocomplete-prompt](https://github.com/mokkabonna/inquirer-autocomplete-prompt) to keep dependencies up to date.\n\nAutocomplete prompt for [inquirer](https://github.com/SBoudrias/Inquirer.js)\n\n[![build status](https://secure.travis-ci.org/raymondfeng/inquirer-autocomplete-prompt.svg)](http://travis-ci.org/raymondfeng/inquirer-autocomplete-prompt)\n[![dependency status](https://david-dm.org/raymondfeng/inquirer-autocomplete-prompt.svg)](https://david-dm.org/raymondfeng/inquirer-autocomplete-prompt)\n\n## Installation\n\n```\nnpm install --save @raymondfeng/inquirer-autocomplete-prompt\n```\n\n## Usage\n\nThis prompt is anonymous, meaning you can register this prompt with the type name you please:\n\n```javascript\ninquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));\ninquirer.prompt({\n  type: 'autocomplete',\n  ...\n})\n```\n\nChange `autocomplete` to whatever you might prefer.\n\n### Options\n\n> **Note:** _allowed options written inside square brackets (`[]`) are optional. Others are required._\n\n`type`, `name`, `message`, `source`[, `pageSize`, `filter`, `when`, `suggestOnly`, `validate`]\n\nSee [inquirer](https://github.com/SBoudrias/Inquirer.js) readme for meaning of all except **source** and **suggestOnly**.\n\n**Source** will be called with previous answers object and the current user input each time the user types, it **must** return a promise.\n\n**Source** will be called once at at first before the user types anything with **undefined** as the value. If a new search is triggered by user input it maintains the correct order, meaning that if the first call completes after the second starts, the results of the first call are never displayed.\n\n**suggestOnly** is default **false**. Setting it to true turns the input into a normal text input. Meaning that pressing enter selects whatever value you currently have. And pressing tab autocompletes the currently selected value in the list. This way you can accept manual input instead of forcing a selection from the list.\n\n**validate** is only active when **suggestOnly** is set to **true**. It behaves like validate for the input prompt.\n\n#### Example\n\n```javascript\ninquirer.registerPrompt(\n  'autocomplete',\n  require('inquirer-autocomplete-prompt')\n);\ninquirer\n  .prompt([\n    {\n      type: 'autocomplete',\n      name: 'from',\n      message: 'Select a state to travel from',\n      source: function (answersSoFar, input) {\n        return myApi.searchStates(input);\n      },\n    },\n  ])\n  .then(function (answers) {\n    //etc\n  });\n```\n\nSee also [example.js](https://github.com/raymondfeng/inquirer-autocomplete-prompt/blob/master/example.js) for a working example.\n\nI recommend using this package with [fuzzy](https://www.npmjs.com/package/fuzzy) if you want fuzzy search. Again, see the example for a demonstration of this.\n\n![Autocomplete prompt](./inquirer.gif)\n\n## Credits\n\n[Martin Hansen](https://github.com/mokkabonna/)\n\n## License\n\nISC\n","readmeFilename":"README.md"}