{"_id":"@bryan-gilbert/typeahead-standalone","_rev":"2-910a9d571554288df4722fdc79142bfd","name":"@bryan-gilbert/typeahead-standalone","dist-tags":{"latest":"4.14.2"},"versions":{"4.14.0":{"name":"@bryan-gilbert/typeahead-standalone","title":"typeahead-standalone","description":"A fast fully-featured standalone autocomplete library","version":"4.14.0","homepage":"https://typeahead.digitalfortress.tech","license":"MIT","scripts":{"dev":"npm run server -- --mode development --progress","prod":"npm run server -- --mode production","watch":"npm run dev -- --watch","server":"webpack","tag":"npm version minor --no-git-tag-version && npm run prod && PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git commit -am \"$PACKAGE_VERSION release\" && git tag v$PACKAGE_VERSION","test":"jest src --verbose","test-e2e-gui":"npm run cy:open","test-e2e":"npm run cy:run","cy:run":"npx cypress run --headless --browser chrome","cy:open":"npx cypress open --browser chrome","lint":"eslint ./src --ext .ts --fix","copy-dts-declarations":"copyfiles -u 1 \"src/**/*.d.ts\" dist"},"jest":{"transform":{"^.+\\.(js|jsx)$":"babel-jest","^.+\\.(ts|tsx)?$":"ts-jest"}},"author":{"name":"Niket Pathak","email":"contact@niketpathak.com","url":"https://niketpathak.com"},"browser":"dist/typeahead-standalone.js","main":"dist/typeahead-standalone.js","types":"dist/typeahead-standalone.d.ts","repository":{"type":"git","url":"git+https://github.com/digitalfortress-tech/typeahead-standalone.git"},"bugs":{"url":"https://github.com/digitalfortress-tech/typeahead-standalone/issues"},"licenses":[{"type":"MIT","url":"https://github.com/digitalfortress-tech/typeahead-standalone/blob/master/LICENSE"}],"keywords":["typeahead","autocomplete","auto-complete","auto-search","typeahead search","bloodhound","suggestion engine","auto select","typeahead search","suggest","suggestions","autosuggest","search","word completion","twitter typeahead","typeahead-standalone.js"],"devDependencies":{"@babel/core":"^7.18.9","@babel/plugin-transform-runtime":"^7.18.9","@babel/preset-env":"^7.18.9","@typescript-eslint/eslint-plugin":"^5.30.7","@typescript-eslint/parser":"^5.30.7","axe-core":"^4.4.3","babel-jest":"^28.1.3","babel-loader":"^8.2.5","copyfiles":"^2.4.1","css-loader":"^6.7.1","css-minimizer-webpack-plugin":"^4.0.0","cypress":"^10.3.1","cypress-axe":"^1.0.0","eslint-config-prettier":"^8.5.0","eslint-loader":"^4.0.2","eslint-plugin-cypress":"^2.12.1","eslint-plugin-jest":"^26.6.0","eslint-plugin-prettier":"^4.2.1","jest":"^28.1.3","less":"^4.1.3","less-loader":"^11.0.0","mini-css-extract-plugin":"^2.6.1","prettier":"^2.7.1","style-loader":"^3.3.1","ts-jest":"^28.0.7","ts-loader":"^9.3.1","typescript":"^4.7.4","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"gitHead":"bdae7abe7ccd54d1e3ab5a56998bdf2dc4d30eb8","_id":"@bryan-gilbert/typeahead-standalone@4.14.0","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-qQj23jbvw92NEdz60g1joVFBc7oRAuVjcoWnHLd6JwWdPOZ7VfgENCsggkqJBfq3FSj2XiV/8chM9LsiaZPx4Q==","shasum":"5e5dd836d7d2e53760c04b3ad2bc097c41349080","tarball":"https://registry.npmjs.org/@bryan-gilbert/typeahead-standalone/-/typeahead-standalone-4.14.0.tgz","fileCount":3,"unpackedSize":23193,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQtldhaVdNcV6+WQmQBztNkN+Bo6ruBCKJKmfH5bSLFAiEAvtNWqR5kawgIW8q2af5bCui6WmJ7MTRUxd8tF4axsB8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrvOsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodwQ//fUS04AAlQ+BHcfPSteSCdscK8FFHfOEFoNaEiErT1QLvryRX\r\nStSOb4BNQfWZZCFCQPSI5j8iUpLvavSsgNPJ1XcnkvV5xk7kOFbynG3jdQ+t\r\naJ0HG0aVaf9n8JmZEqv/nZ6/TsphD6NIwuIC/XS3pVab3QlB62yG2XK+5b/5\r\nUhaXWjv9/k3ELBn4GMbGhdvoZAetqlBYgksI7ZCEcotFVQz3Y5343eupH4CG\r\n8Q49/4aC0DoEwLIwUYKHVX1GmNO6F/oxDFNlxjIElRmiaC61X6R2t1ahNmbL\r\nU9aE5JDuU6jZZPb+UzXu1eMvzaTz/2JqJLv2UuWTqBSVfTn7+QcY//hl//JF\r\nslZ/dOwyNB619OP2IxxC5BUGJszRQ+Ul3h0eAby0NkpstNQj8F9KyBjWylXq\r\nIlR77wXWUR4zEU5lm4kCA3BAf08fqmkcsVv7bLoudPNpDx0so1Pt6+ve6wsv\r\naRNNLEKrS07XLA8QNvrMtZyUJXtbHXcLNwFD4G6yeSIkYbFH0opjhJpBhP4U\r\nWJtMeK8avIEWy0g5SDruxXotE1C/Viz4qQw4ZvDBhSkXPhrv/MSKy87c8lCP\r\n4mv9kjWD9r73ArU6MwEILY/AmzZQf71Sy4acNqn7tzSBddD6X3xqd0e2YviS\r\nFMIPlj/4jvTflkQ50asccWw8VoCnL7a3uM8=\r\n=F/uA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"},"directories":{},"maintainers":[{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typeahead-standalone_4.14.0_1672410027782_0.02326451548168529"},"_hasShrinkwrap":false},"4.14.1":{"name":"@bryan-gilbert/typeahead-standalone","title":"typeahead-standalone","description":"A fast fully-featured standalone autocomplete library","version":"4.14.1","homepage":"https://typeahead.digitalfortress.tech","license":"MIT","scripts":{"dev":"npm run server -- --mode development --progress","prod":"npm run server -- --mode production","watch":"npm run dev -- --watch","server":"webpack","tag":"npm version minor --no-git-tag-version && npm run prod && PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git commit -am \"$PACKAGE_VERSION release\" && git tag v$PACKAGE_VERSION","test":"jest src --verbose","test-e2e-gui":"npm run cy:open","test-e2e":"npm run cy:run","cy:run":"npx cypress run --headless --browser chrome","cy:open":"npx cypress open --browser chrome","lint":"eslint ./src --ext .ts --fix","copy-dts-declarations":"copyfiles -u 1 \"src/**/*.d.ts\" dist"},"jest":{"transform":{"^.+\\.(js|jsx)$":"babel-jest","^.+\\.(ts|tsx)?$":"ts-jest"}},"author":{"name":"Niket Pathak","email":"contact@niketpathak.com","url":"https://niketpathak.com"},"browser":"dist/typeahead-standalone.js","main":"dist/typeahead-standalone.js","types":"dist/typeahead-standalone.d.ts","repository":{"type":"git","url":"git+https://github.com/digitalfortress-tech/typeahead-standalone.git"},"bugs":{"url":"https://github.com/digitalfortress-tech/typeahead-standalone/issues"},"licenses":[{"type":"MIT","url":"https://github.com/digitalfortress-tech/typeahead-standalone/blob/master/LICENSE"}],"keywords":["typeahead","autocomplete","auto-complete","auto-search","typeahead search","bloodhound","suggestion engine","auto select","typeahead search","suggest","suggestions","autosuggest","search","word completion","twitter typeahead","typeahead-standalone.js"],"devDependencies":{"@babel/core":"^7.18.9","@babel/plugin-transform-runtime":"^7.18.9","@babel/preset-env":"^7.18.9","@typescript-eslint/eslint-plugin":"^5.30.7","@typescript-eslint/parser":"^5.30.7","axe-core":"^4.4.3","babel-jest":"^28.1.3","babel-loader":"^8.2.5","copyfiles":"^2.4.1","css-loader":"^6.7.1","css-minimizer-webpack-plugin":"^4.0.0","cypress":"^10.3.1","cypress-axe":"^1.0.0","eslint-config-prettier":"^8.5.0","eslint-loader":"^4.0.2","eslint-plugin-cypress":"^2.12.1","eslint-plugin-jest":"^26.6.0","eslint-plugin-prettier":"^4.2.1","jest":"^28.1.3","less":"^4.1.3","less-loader":"^11.0.0","mini-css-extract-plugin":"^2.6.1","prettier":"^2.7.1","style-loader":"^3.3.1","ts-jest":"^28.0.7","ts-loader":"^9.3.1","typescript":"^4.7.4","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"gitHead":"5150f8a26d06308b0b93415f849ffd4573563ea4","_id":"@bryan-gilbert/typeahead-standalone@4.14.1","_nodeVersion":"16.17.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-tTfY3Dmmkpphg+tsCZfSuGc/Q+BWTimkWXUntXtQKQSRNFBN1q5YsDBk7v8XZiQCwzaBu/TsRLECPWKzF+BYGg==","shasum":"867ad51c544cdb4b591914ca8e2decc1d7691233","tarball":"https://registry.npmjs.org/@bryan-gilbert/typeahead-standalone/-/typeahead-standalone-4.14.1.tgz","fileCount":13,"unpackedSize":91745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFejkl4hNpZWZOKY/ghK30+aNYigKhBT800ZO0bN+vZUAiEAwHtwNSbOTnloQJH84KtofHCv7sJXrAWpN5+yQCpgYTw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrvaWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5Uw//dpZ2k1D2m6LWqwq2rwyVl4QyOoG0eEeFp4M3uQ5AmJIRHaRm\r\nmheU2wGx2EjkXetNh58eSjNPOLM9CAW9xaqEO4Y6LUf+mHfHGojyZqrCGCDq\r\nyaS8SP9w6/FAM4iFwxg4xfT6MHvSNo8QQiiIsJxd+1B/0ri0Sb1P9cSoiNMv\r\nP98D8dgWs9z8wjvCTYfuKFa26yhcJaCt1mvqnNWqJqdhvCw/+8YvC70ImlF+\r\nXHz6IakdlqTTdmn+FHU7xW3dsDflyfjbEDPIeAejBL2LvaRS4mVwm34WPz4Z\r\nz8B5b68Xjfw01yEt+HhAjBDDLGCJkQvKtFSyI6bUcAqXiJcJB6tyw/9Hc3um\r\n7VS1MdBopZ10vdv1LnPkTwpKV1V3A7MLjn3cKWrnKDVslCX+5P3T7VgsSqCb\r\npCzFoG8UH9ARGxqxu4Uey9159LP8oPadR5PYyuD35DtaoQP5rl9P6A1s3c2Z\r\n/51Kg3GBqO2CzLsm0xPfEu/d4rlgFRjhpI1DfxmMkYx0FHG6AkI3Fg1GgmUt\r\nybactn2Oas0uvhGEDseO7OsY1OENaDPxV8clE+kIUJrcrfwB+7UO3bAlahbd\r\ntHE9OhZZty4SMe0VuFFlpEI5Xtvs6xsYKl6JcQF/fjQuByD8woKrNN7X8tc4\r\n80uVepetdTo1XMQ2N2wM5KNQStMgMvFHOfg=\r\n=eIDE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"},"directories":{},"maintainers":[{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typeahead-standalone_4.14.1_1672410773795_0.7911453042852776"},"_hasShrinkwrap":false},"4.14.2":{"name":"@bryan-gilbert/typeahead-standalone","title":"typeahead-standalone","description":"A fast fully-featured standalone autocomplete library","version":"4.14.2","homepage":"https://typeahead.digitalfortress.tech","license":"MIT","scripts":{"dev":"npm run server -- --mode development --progress","prod":"npm run server -- --mode production","watch":"npm run dev -- --watch","server":"webpack","tag":"npm version minor --no-git-tag-version && npm run prod && PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git commit -am \"$PACKAGE_VERSION release\" && git tag v$PACKAGE_VERSION","test":"jest src --verbose","test-e2e-gui":"npm run cy:open","test-e2e":"npm run cy:run","cy:run":"npx cypress run --headless --browser chrome","cy:open":"npx cypress open --browser chrome","lint":"eslint ./src --ext .ts --fix","copy-dts-declarations":"copyfiles -u 1 \"src/**/*.d.ts\" dist"},"jest":{"transform":{"^.+\\.(js|jsx)$":"babel-jest","^.+\\.(ts|tsx)?$":"ts-jest"}},"author":{"name":"Niket Pathak","email":"contact@niketpathak.com","url":"https://niketpathak.com"},"browser":"dist/typeahead-standalone.js","main":"dist/typeahead-standalone.js","types":"dist/typeahead-standalone.d.ts","repository":{"type":"git","url":"git+https://github.com/digitalfortress-tech/typeahead-standalone.git"},"bugs":{"url":"https://github.com/digitalfortress-tech/typeahead-standalone/issues"},"licenses":[{"type":"MIT","url":"https://github.com/digitalfortress-tech/typeahead-standalone/blob/master/LICENSE"}],"keywords":["typeahead","autocomplete","auto-complete","auto-search","typeahead search","bloodhound","suggestion engine","auto select","typeahead search","suggest","suggestions","autosuggest","search","word completion","twitter typeahead","typeahead-standalone.js"],"devDependencies":{"@babel/core":"^7.18.9","@babel/plugin-transform-runtime":"^7.18.9","@babel/preset-env":"^7.18.9","@typescript-eslint/eslint-plugin":"^5.30.7","@typescript-eslint/parser":"^5.30.7","axe-core":"^4.4.3","babel-jest":"^28.1.3","babel-loader":"^8.2.5","copyfiles":"^2.4.1","css-loader":"^6.7.1","css-minimizer-webpack-plugin":"^4.0.0","cypress":"^10.3.1","cypress-axe":"^1.0.0","eslint-config-prettier":"^8.5.0","eslint-loader":"^4.0.2","eslint-plugin-cypress":"^2.12.1","eslint-plugin-jest":"^26.6.0","eslint-plugin-prettier":"^4.2.1","jest":"^28.1.3","less":"^4.1.3","less-loader":"^11.0.0","mini-css-extract-plugin":"^2.6.1","prettier":"^2.7.1","style-loader":"^3.3.1","ts-jest":"^28.0.7","ts-loader":"^9.3.1","typescript":"^4.7.4","webpack":"^5.73.0","webpack-cli":"^4.10.0"},"gitHead":"66227e6b9f4c4f8956834680aaf8c9b75833af13","_id":"@bryan-gilbert/typeahead-standalone@4.14.2","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-Qu59Ia+yuRMtxWULtqy10qCT9L1UhXowyZP1xl7Zdy/zwNL/RTT8STayrQnUkwvSZmCJOey88oP+qyBDl38OEw==","shasum":"dc95e84851004728d768436002098bfc026a34cc","tarball":"https://registry.npmjs.org/@bryan-gilbert/typeahead-standalone/-/typeahead-standalone-4.14.2.tgz","fileCount":13,"unpackedSize":136552,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvsd+R1ZJBH/dilSWjcTph/iaqTPHuXzCfYUuhnAxBEAIgGTusmqlrUdr1Um5z0BslWT1xVkRTN2wKnA96svOr/5U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwFLIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8NQ//dEZWrlNYapbPZQQPZWjiKndz9EPxKuAL8F5r2opra36HHwgZ\r\nGuJ4RHtyFCKsZNAe4TwHmNomtwCO5FjQoUxyYlrYW/x0ygNKkvjIr6jXFL9B\r\n+aKV2qqJT/RipXrWoAE/zvdceDtt4ovdHoN5fQX3S0NTouTApvYkxgv6VN5T\r\ncTbHTkZ73VX/AK/noGS5sLmIULt7+3tJ+sI9dmPgFOuXbd/gZZhlcy0xhOhC\r\n+ZmD5TELHWL/8QLc8gY7MtLxYFrN4hLgau+yv/VR+R6OjQb1jfVi6WIdpG5f\r\n0HSY3BF0I/RDicurBzB9YLHVyKwQ8ScILRFXnGVU2KSFGrmKAfiNgmWORnbx\r\nfTdcrxFLM05XZYji2RZLLso9+o72iLV4L8Vg0mn1vmz7+sY2p1j5KQHS/SlP\r\nW5h+yFHN/7z6woHj26ksuwmTfGR9Q0HKeF5X6OsRI+kO6uVRFwA/2t9QtbO+\r\nwe5UZjEwzXmg1mUHBNoQGumsMoPo0VIMeV+pU5EI9JKgp4gwpjluXoMVarUk\r\ndcRblu3g0E0To8aJHXFtk3l6256VpLPfq/+lo5MkW0XECGbwMlRsfsS27gPV\r\nUhnzkAuwiA38x3BHjH3aEWoi6GMmdxhTA4m3O8OyY/xVx5TJw9Qz4Cxvkb2I\r\nG9uiDwekVHbjafcKqnYuMBRQrFokB+6si8M=\r\n=5JgR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"},"directories":{},"maintainers":[{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typeahead-standalone_4.14.2_1673548487895_0.9474191040762434"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-30T14:20:27.719Z","4.14.0":"2022-12-30T14:20:27.983Z","modified":"2023-01-12T18:34:48.169Z","4.14.1":"2022-12-30T14:32:54.002Z","4.14.2":"2023-01-12T18:34:48.035Z"},"maintainers":[{"name":"bryan-gilbert","email":"bryan.gilbert@memsharp.com"}],"description":"A fast fully-featured standalone autocomplete library","homepage":"https://typeahead.digitalfortress.tech","keywords":["typeahead","autocomplete","auto-complete","auto-search","typeahead search","bloodhound","suggestion engine","auto select","typeahead search","suggest","suggestions","autosuggest","search","word completion","twitter typeahead","typeahead-standalone.js"],"repository":{"type":"git","url":"git+https://github.com/digitalfortress-tech/typeahead-standalone.git"},"author":{"name":"Niket Pathak","email":"contact@niketpathak.com","url":"https://niketpathak.com"},"bugs":{"url":"https://github.com/digitalfortress-tech/typeahead-standalone/issues"},"license":"MIT","readme":"# Typeahead-standalone.js\n\n[![npm version](https://img.shields.io/npm/v/typeahead-standalone.svg)](https://www.npmjs.com/package/typeahead-standalone)\n[![Build Status](https://travis-ci.org/niketpathak/typeahead-standalone.svg?branch=master)](https://travis-ci.org/niketpathak/typeahead-standalone)\n[![code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![CDN Hits](https://data.jsdelivr.com/v1/package/npm/typeahead-standalone/badge?style=rounded)](https://www.jsdelivr.com/package/npm/typeahead-standalone)\n[![Downloads](https://img.shields.io/npm/dt/typeahead-standalone)](https://www.npmjs.com/package/typeahead-standalone)\n![maintained](https://img.shields.io/badge/maintained-yes-blueviolet)\n[![License](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![speed blazing](https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-9cf.svg)](https://twitter.com/acdlite/status/974390255393505280)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?logo=paypal)](https://www.paypal.com/donate/?hosted_button_id=PZ5ULVZBZX55A)\n\n---\nA fast fully-featured standalone autocomplete library\n\n**🌟 Highlights 🌟**\n\n- 🚀 Blazing fast suggestions and autocompletion\n- 📦 Has **0 DEPENDENCIES**! Written in pure JS (typescript)\n- 🎀 Framework agnostic! Usable with **any** framework (React, Vue, Svelte, etc)\n- 💡 Highly customizable and light-weight [![~4kb minzipped](https://badgen.net/bundlephobia/minzip/typeahead-standalone)](https://bundlephobia.com/package/typeahead-standalone)\n- ⚜️ In-built support for multiple data sources - Local, Prefetch and Remote (requests rate-limited by default)\n- ⚡️ Suggestions calculated via a very efficient algorithm based on trie data structure\n- ♿️ WAI-ARIA compliant design pattern with support for language diacritics\n- 🌐 Supports every major browser!\n---\n\n### 🔥 Demo/Docs\n\nFind here **[detailed Docs with Live Demos](https://typeahead.digitalfortress.tech/)** for **typeahead-standalone.js**.\n\nPreview of a basic example:\n\n![Basic example](./demo/basic-ex.gif)\n\n## <a id=\"installLink\">➕ Install</a>\n\n```shell script\n# you can install typeahead with npm\n$ npm install --save typeahead-standalone\n\n# Alternatively you can use Yarn\n$ yarn add typeahead-standalone\n```\nThen include the library in your App/Page.\n\n**As a module,**\n```javascript\n// using ES6 modules\nimport typeahead from 'typeahead-standalone'; // imports library (js)\nimport 'typeahead-standalone/dist/basic.css'; // imports basic styles (css)\n\n// using CommonJS modules\nconst typeahead = require('typeahead-standalone');\nrequire('typeahead-standalone/dist/basic.css');\n```\n\n**In the browser context,**\n```html\n<!-- Include the basic styles & the library -->\n<link rel=\"stylesheet\" href=\"./node_modules/typeahead-standalone/dist/basic.css\" />\n<script src=\"./node_modules/typeahead-standalone/dist/typeahead-standalone.js\"></script>\n\n<!-- Alternatively, you can use a CDN. For example, use jsdelivr to get the latest version -->\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/typeahead-standalone/dist/basic.css\" />\n<script src=\"https://cdn.jsdelivr.net/npm/typeahead-standalone\"></script>\n\n<!-- or use unpkg.com to get a specific version -->\n<link rel=\"stylesheet\" href=\"https://unpkg.com/typeahead-standalone@4.14.1/dist/basic.css\" />\n<script src=\"https://unpkg.com/typeahead-standalone@4.14.1/dist/typeahead-standalone.js\"></script>\n```\nThe library will be available as a global object at **`window.typeahead`**\n\n## 🌱 Usage\n\nTypeahead requires an **`input`** Element to attach itself to, and a **`Data source`** (local/remote) to display suggestions.\n\nHere is a very basic example (See [demo](#demo) for advanced examples)\n\n#### Html\n\n```html\n<!-- include the library -->\n<script src=\"...\" async></script>\n\n<!-- Html markup -->\n<input type=\"search\" id=\"searchInput\" autocomplete=\"off\" placeholder=\"Search...\">\n```\n#### Javascript\n\n```javascript\n// local Data\nconst colors = ['Grey', 'Brown', 'Black', 'Blue'];\n\n// input element to attach to\nconst inputElement = document.getElementById(\"searchInput\");\n\ntypeahead({\n    input: inputElement,\n    source: {\n      local: colors,\n      // prefetch: {...}\n      // remote: {...}\n    }\n});\n```\n\n## <a id=\"configoptions\">🔧 Configuration</a>\n\n\nYou can pass the following config options to `typeahead-standalone`:\n\n| Parameter | Description | Default |\n| --------- | ----------- | ------- |\n|`input`|DOM input element must be passed with this parameter and typeahead will attach itself to this field. |`-` (Required)|\n|`source`|This is the source of Data from which suggestions will be calculated. The source can be local, prefetched or retrieved from a remote endpoint. [Details](#source) |`-` (Required)|\n|`minLength`|Specify the minimum length, when suggestions should appear on the screen.|`1`|\n|`limit`|Specify the maximum number of suggestions that should be displayed.|`5`|\n|`highlight`| If set to true, the matched letters are highlighted in the list of suggestions. A class `tt-highlight` is added to facilitate styling|`undefined`|\n|`autoSelect`| If set to true, pre-selects the first displayed suggestion |`false`|\n|`hint`| Updates the input placeholder to be equal to the first matched suggestion. A class `tt-hint` is added to facilitate styling|`true`|\n|`diacritics`| Flag to enable/disable language diacritics supported search (i.e. search by converting accented characters into their non-accented counterparts)|`undefined`|\n|`className`|The typeahead-standalone container will have this class name (in addition to the default class `typeahead-standalone`)|`undefined`|\n|`templates`|An object containing templates for header, footer, suggestion, group and notFound state. See [templates section](#templates) for clarification |`undefined`|\n|`debounceRemote`|Delays execution of making Ajax requests (in milliseconds) |`100`|\n|`preventSubmit`|If your input element is used inside a form element, this flag allows to prevent the default submit action when the ENTER key is pressed.|`false`|\n|`onSubmit(event, selectedItem?)`|When you want to use typeahead outside a form element, this handler can be used to process/submit the input value. Gets triggered on hitting the ENTER key. First parameter is the keyboard Event and the 2nd parameter is the selected item or undefined if no item was selected|`undefined`|\n|`display(selectedItem, event?) => string`|This callback is executed when the user selects an item from the suggestions. The current suggestion/item is passed as a parameter and it **must return a string** which is set as the input's value. The 2nd *optional* parameter `event` is a Mouse/Keyboard event which can be used to track user interaction or for analytics. It defaults to `null`. |Returns the string representation of the selected item|\n\n---\n\n### 🔌 Source\n\nThis is the source of data from which suggestions will be provided. This is the expected format of the source object.\n```\nsource: {\n  local: [],\n  fnSource: () => [],\n  remote: {\n    url: 'https://remoteapi.com/%QUERY', // OR `url: () => 'https://remoteapi.com/%QUERY',`\n    wildcard: '%QUERY',\n    requestOptions: {}        // optional, default => undefined\n  },\n  prefetch: {\n    url: 'https://remoteapi.com/load-suggestions', // OR `url: () => string`\n    when: 'onFocus',          // optional, default => 'onInit'\n    done: false,              // optional, default => false\n    process: (items) => void, // optional, default => undefined\n    requestOptions: {}        // optional, default => undefined\n  },\n  identifier: '...',          // optional (required when source => Object[])\n  identity: (item) => string, // optional (determines uniqueness of each suggestion)\n  dataTokens: ['...'],        // optional\n  groupIdentifier: '...',     // optional, default => undefined\n  transform: function (data) {\n    // modify received data if needed & return it\n    return data;\n  }\n}\n```\n- **Local**: The `local` data source is used when you want to provide suggestions from a local source, like a variable, that are available at the moment the typeahead is initialized.\n- **fnSource**: The `fnSource` data source provides a dynamic list that is loading each time the typeahead gains focus. It is a function that can provide suggestions from the current context of the application.\n- **Prefetch**: The `prefetch` data source is used when you want to preload suggestions from a remote endpoint in advance. You must provide the `url` parameter that points to the endpoint that will return suggestions. You can provide an optional `when` parameter which defines when the prefetch request should occur. It defaults to `onInit` meaning that suggestions will be preloaded as soon as typeahead gets initialized. You can set it to `onFocus` which will cause suggestions to be preloaded only when the user focuses the search input box. The `done` flag is optional & can be used to disable the prefetch request programmatically. Its default value is `false`. It gets set to `true` automatically when data is prefetched for the first time (to prevent multiple network requests). By setting `done: true`, the prefetch request will not occur. An example use-case to do this is when you are using *localStorage* to store suggestions but the *localStorage* already had stored suggestions previously thereby eliminating the need to prefetch data again. The `process(suggestions)` callback is optional. It gets executed after the prefetch request occurs. It receives the transformed suggestions as a parameter & as an example can be used to store the received suggestions in *localStorage* to be used later.\n- **Remote**: The `remote` data source is used when you want to interrogate a remote endpoint to fetch data.\n- **Wildcard**: While using the `remote` data source, you must set the `url` and the `wildcard` options. `wildcard` will be replaced with the search string while executing the request.\n- **RequestOptions**: The [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) API is used to query remote endpoints.  You may provide an object of [requestOptions](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#supplying_request_options) to customize the outgoing request. By default the query type is `GET`.\n- **Transform**: You can provide an optional `transform()` function which gets called immediately after the prefetch/remote endpoint returns a response. You can modify the response before it gets processed by typeahead.\n- **Identifier**: An `identifier` is required when the data source is an array of objects. An `identifier` is used to identify which property of the object should be used as the text for displaying the suggestions. For example, lets say the data source is something like this:\n```javascript\n/* Example Data source */\n[\n  { id: 1, color: \"Yellow\", colorCode: \"YW\" },\n  { id: 2, color: \"Green\", colorCode: \"GN\", shade: \"Greenish\" },\n  { id: 3, color: \"Olive\", colorCode: \"OV\", shade: \"Greenish\" },\n  ...\n]\n ```\nNow if we wish to use the the text defined in the `color` property to appear as the suggestions, then the **identifier** must be set to **color**. (i.e. `identifier: \"color\"`)\n- **dataTokens**: `dataTokens: string[]` is an _optional_ property. It accepts an array of strings which represent the properties of the source object that should be added to the search index. This can be best understood with an example. Lets take the same example data source as shown above. What if you wanted to search colors by another property(_colorCode_) and not just by its identifier(_color_) ? That's exactly where **dataTokens** comes in. Set `dataTokens: [\"colorCode\"]`. If you now search for \"**YW**\", the suggestion \"Yellow\" pops up as expected.\n- **groupIdentifier**: If you wish to group your suggestions, set the groupIdentifier property. This is an optional property. Again, going with the same example data source as above, when you set `groupIdentifier: \"shade\"`, suggestions will be grouped by the property \"**shade**\". In this example, the colors _Green_ and _Olive_ will appear under the group \"**Greenish**\" (`shade`) whereas the color _Yellow_ will have no group.\n- **identity**: The `identity()` function is used to determine uniqueness of each suggestion. It receives the suggestion as a parameter and must return a string unique to the given suggestion. This is an optional property and it defaults to returning the `identifier`. However, the default value might not work everytime. For example, consider the following code -\n```javascript\n/* Example Data source of Songs */\n[\n  { title: \"God is Good\", artist: \"Don Moen\" },\n  { title: \"God is Good\", artist: \"Paul Wilbur\" },\n  { title: \"God is Good\", artist: \"Micheal Smith\" },\n  { title: \"El Shaddai\", artist: \"Amy Grant\" },\n  ...\n]\n ```\nLets assume the identifier is set to `title`. By default the `identity()` function uses the **identifier** property (i.e. the **title**) to determine uniqueness. So if you search for `God`, you will find only 1 suggestion displayed since there are 3 songs with the **exact same `title`** property. In order to show all 3 suggestions with different artists, you need to set the `identity` property such that it returns a unique string -\n ```js\n identity(item) => `${item.title}${item.artist}`;\n ```\nIt is **highly recommended** to use the `identity()` property to return a unique string when your data source is an array of Objects.\n\nCheckout the **[Live Examples](https://typeahead.digitalfortress.tech/)** for further clarification.\n\n---\n## 🎨 Styling (css)\n\nSome basic styling is provided with typeahead. The UI is completely upto you and is customizable to the very pixel. You can use the following classes to add/override styles.\n\n- The entire html is wrapped in a container with a class `typeahead-standalone`.\n- The input element has a `tt-input` class.\n- The hint element has a `tt-hint` class.\n- The list of suggestions is wrapped in a container with a `tt-list` class. (A class `tt-hide` is added when no suggestions are available)\n- Each suggestion has a class `tt-suggestion` and if the suggestion is selected, then it has a `tt-selected` class additionally.\n- If the highlight config option is set to *true*, every highlighted text block has a `tt-highlight` class.\n\n\n<details>\n  <summary>\n  <b>Styling upto version 3.x.x</b>\n  </summary>\n\nYou can add your own styles by targetting the parent selector `.typeahead-standalone`. For example, we can update the background color of every suggestion as seen below -\n```css\n/* set background color for each suggestion */\n.typeahead-standalone .tt-list .tt-suggestion {\n  background-color: green;\n}\n```\n\nTo **override** default styling, set the config option `className` and use it as a selector. Lets say you set `className: \"my-typeahead\"`, then to override style on hovering/selecting a suggestion, you could use:\n ```css\n/* override styles */\n.typeahead-standalone.my-typeahead .tt-list .tt-suggestion:hover,\n.typeahead-standalone.my-typeahead .tt-list .tt-suggestion.tt-selected {\n  color: black;\n  background-color: white;\n}\n```\n</details>\n\n<details>\n  <summary>\n  <b>Styling for version 4.x.x and above</b>\n  </summary>\n\nStarting with `v4.0`, the JS and CSS has been separated allowing greater control over the style. The entire css can be retrieved either from the [CDN](https://cdn.jsdelivr.net/npm/typeahead-standalone/dist/basic.css)  or from below and be copied directly into your project allowing you to discard/override any styles as necessary.\n\n  ```css\n/***** basic styles *****/\n.typeahead-standalone {\n    position: relative;\n    text-align: left;\n    color: #000;\n}\n.typeahead-standalone .tt-input {\n    z-index: 1;\n    background: transparent;\n    position: relative;\n}\n.typeahead-standalone .tt-hint {\n    position: absolute;\n    left: 0;\n    cursor: default;\n    user-select: none;\n    background: #fff;\n    color: silver;\n    z-index: 0;\n}\n.typeahead-standalone .tt-list {\n    background: #fff;\n    z-index: 1000;\n    box-sizing: border-box;\n    overflow: auto;\n    border: 1px solid rgba(50, 50, 50, 0.6);\n}\n.typeahead-standalone .tt-list.tt-hide {\n    display: none;\n}\n.typeahead-standalone .tt-list div[class^=\"tt-\"] {\n    padding: 0 4px;\n}\n.typeahead-standalone .tt-list .tt-suggestion:hover,\n.typeahead-standalone .tt-list .tt-suggestion.tt-selected {\n    background: #55acee;\n    cursor: pointer;\n}\n.typeahead-standalone .tt-list .tt-suggestion .tt-highlight {\n    font-weight: 900;\n}\n.typeahead-standalone .tt-list .tt-group {\n    background: #eee;\n}\n```\n</details>\n\n\nYou can also use templates to add a header, footer and further style each suggestion.\n\n### 💫 Templates\n\nTemplates can be used to customize the rendering of the List. Their usage is completely optional. Currently, there are 5 templates available -\n\n```javascript\ntemplates: {\n  header: () => '<h1>List of Countries</h1>', /* Rendered at the top of the dataset */\n  footer: () => '<div>See more</div>', /* Rendered at the bottom of the dataset */\n  suggestion: (item) => {   /* Used to render a single suggestion */\n    return `<div class=\"custom-suggestion\">${item.label}</div>`;\n  },\n  group: (groupName) => {   /* Used to render a group */\n    return `<div class=\"custom-group\">${groupName}</div>`;\n  },\n  notFound: () => '<span>Nothing Found</span>', /* Rendered if no suggestions are available */\n}\n```\nAs seen above, each template takes a callback that must return a `string` which is later interpreted as HTML.\n\nEach template is wrapped in a `div` element with a corresponding class. i.e.\n- `header` => class `tt-header`\n- `footer` => class `tt-footer`\n- `suggestion` => class `tt-suggestion`\n- `group` => class `tt-group`\n- `notFound` => class `tt-notFound`\n---\n\n### ✨ API\n\n* [`typeahead.destroy()`](#typeaheaddestroy)\n\n#### <a id=\"typeaheaddestroy\">typeahead.`destroy()`</a>\n\nDestroys the typeahead instance, removes all event handlers and cleans up the DOM. Can be used once when you no more want to have suggestions.\n\n```javascript\nconst instance = typeahead({ /* options */ });\ninstance.destroy();\n```\n\n---\n\n### 💡 Error Codes\n\nHere is a small glossary of the possible errors codes that one may come across\n\n| Code | Description |\n| --------- | ----------- |\n| e01 | Missing input DOM element |\n| e02 | Missing/Incorrect source of suggestions. You must provide atleast one of the 3 possible sources - local, prefetch or remote with the expected source format ([Ref](#source)) |\n| e03 | Identifier not defined |\n| e04 | Prefetch request failed |\n| e05 | Remote request failed |\n\n---\n### 🧑‍💻 Contribute\n\nInterested in contributing features and fixes?\n\n[Read more on contributing](./contributing.md).\n\n### 📝 Changelog\n\nSee the [Changelog](https://github.com/digitalfortress-tech/typeahead-standalone/wiki/Changelog)\n\n### 📄 License\n\n[MIT](LICENSE) © [DigitalFortress](https://digitalfortress.tech)\n","readmeFilename":"README.md"}