{"_id":"@dumbmatter2/inquirer-autocomplete-prompt-default","_rev":"1-ab106caee2e5de4e0c9ab095e96f4602","name":"@dumbmatter2/inquirer-autocomplete-prompt-default","dist-tags":{"latest":"0.11.0"},"versions":{"0.11.0":{"name":"@dumbmatter2/inquirer-autocomplete-prompt-default","description":"Autocomplete prompt for inquirer","version":"0.11.0","dependencies":{"ansi-escapes":"^2.0.0","chalk":"^1.1.3","figures":"^2.0.0","inquirer":"3.1.1","lodash":"^4.17.4","run-async":"^2.3.0","util":"^0.10.3"},"scripts":{"lint":"jshint .","checkStyle":"jscs .","pretest":"npm run-script lint && npm run-script checkStyle","test":"istanbul cover ./node_modules/.bin/_mocha test/spec","posttest":"istanbul check-coverage --statements 85 --branches 85 --functions 85 --lines 85 && rm -rf coverage"},"publishConfig":{"registry":"http://registry.npmjs.org"},"author":{"name":"Martin Hansen","email":"martin@martinhansen.no"},"license":"ISC","devDependencies":{"bluebird":"^3.0.5","chai":"^4.0.1","fuzzy":"^0.1.3","istanbul":"^0.4.5","jscs":"^3.0.7","jshint":"^2.5.6","lodash":"^4.17.4","mocha":"^3.3.0","promise":"^8.0.0","sinon":"^2.1.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/mokkabonna/inquirer-autocomplete-prompt.git"},"gitHead":"ff4cdd0135919f478d53bebd9d445d33d562a740","bugs":{"url":"https://github.com/mokkabonna/inquirer-autocomplete-prompt/issues"},"homepage":"https://github.com/mokkabonna/inquirer-autocomplete-prompt#readme","_id":"@dumbmatter2/inquirer-autocomplete-prompt-default@0.11.0","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-zphveCKAdtPtJjTLHFX55AGOAw6JncbkhJ0XGevzjjwin7ZokLwyiyhJ9vY23wMtrRMZL2cqYBYminZZDO1qMw==","shasum":"5447d324f3150a2277acfd5e11949cc18f5f60d5","tarball":"https://registry.npmjs.org/@dumbmatter2/inquirer-autocomplete-prompt-default/-/inquirer-autocomplete-prompt-default-0.11.0.tgz","fileCount":13,"unpackedSize":375587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLCl+CRA9TVsSAnZWagAAMJgQAJC8ru+fMFqVl0V0mxlP\ndhhQ5ktHlHA0V9lbd3bVJuxGtnGPOq9kCmsqXj1KTsnZysPfYmWcU5uEa23p\nDSSP+jeO+Sk08RgQZDV67CSx41h+6C97OAt7UYDFjrhAngN5mxOvkFKBVWdf\nMl3YIQTJLkb/KfGLmCu+a+fL8R4MgKk9HRadDrhPsaFR+OMknWva0eiXRsOm\n6XkGp8AG1fdeqtzvpcFQsdqb8tdxGanT0j4sqwOVd4saGlkMM7BZTF4gE3f8\nM9lY65amrS/+pzjcXqjaIMgAo7LHtsObVTLeNJYX75rfwbchSoKRa8smc9ot\nIDLYv/qeULGoCkChdtPYLZ5fZY4ZMxHPlTLkPtVef30xnHvkea+4HO7ddeUC\nUXUAV6RnCfonRcMTqtEhCRKquobpFxo/tM1yojZGbmOTibpcu/fkEq7pqh8y\nrmOA3l9DXmU6i5ZizZcSlkkNjnOx1oPstxHxVYv4PeB+kqgzbJ69FGMxlh99\ndM00YfycCnOMQDiwl9KQX+2Z2v37B2/yEUIuSPSyTIn2D9t9ARECEtSARSKN\nKEunbdDObASmnq+NPj/tyHPLRE82LWlczoESUgy236Rsb63gLzDhPJqDRxP1\ngm/MrQ33M6s4nZ5O5F2heIpsBFY7qQqcYlriTDgy6h4YlRtono5bscxmHjZ5\nmAD2\r\n=HP3i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE9GHvO/Dw+n7ZxDUr4SX44vklt+YYrXtH8nRDknFpIdAiEA4oLYGhvl9WR8N9GWqTz9+r0BUOt/74rODLrc6893920="}]},"maintainers":[{"name":"dumbmatter","email":"jdscheff@gmail.com"}],"_npmUser":{"name":"dumbmatter","email":"jdscheff@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inquirer-autocomplete-prompt-default_0.11.0_1596729725585_0.8019637370152772"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-06T16:02:05.346Z","0.11.0":"2020-08-06T16:02:05.778Z","modified":"2022-04-05T06:08:08.554Z"},"maintainers":[{"name":"dumbmatter","email":"jdscheff@gmail.com"}],"description":"Autocomplete prompt for inquirer","homepage":"https://github.com/mokkabonna/inquirer-autocomplete-prompt#readme","repository":{"type":"git","url":"git+ssh://git@github.com/mokkabonna/inquirer-autocomplete-prompt.git"},"author":{"name":"Martin Hansen","email":"martin@martinhansen.no"},"bugs":{"url":"https://github.com/mokkabonna/inquirer-autocomplete-prompt/issues"},"license":"ISC","readme":"# inquirer-autocomplete-prompt\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/mokkabonna/inquirer-autocomplete-prompt.svg)](https://greenkeeper.io/)\n\nAutocomplete prompt for [inquirer](https://github.com/SBoudrias/Inquirer.js)\n\n[![build status](https://secure.travis-ci.org/mokkabonna/inquirer-autocomplete-prompt.svg)](http://travis-ci.org/mokkabonna/inquirer-autocomplete-prompt)\n[![dependency status](https://david-dm.org/mokkabonna/inquirer-autocomplete-prompt.svg)](https://david-dm.org/mokkabonna/inquirer-autocomplete-prompt)\n\n## Installation\n\n```\nnpm install --save inquirer-autocomplete-prompt\n```\n\n## Usage\n\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 **null** 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\n#### Example\n\n```javascript\ninquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));\ninquirer.prompt([{\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}]).then(function(answers) {\n  //etc\n});\n```\n\nSee also [example.js](https://github.com/mokkabonna/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[Martin Hansen](https://github.com/mokkabonna/)\n\n## License\n\nISC\n","readmeFilename":"README.md"}