{"id":23053524,"url":"https://github.com/component/autosuggest","last_synced_at":"2025-08-15T03:33:02.552Z","repository":{"id":7140397,"uuid":"8437401","full_name":"component/autosuggest","owner":"component","description":"Autosuggest values for text inputs","archived":false,"fork":false,"pushed_at":"2013-08-21T17:09:11.000Z","size":96,"stargazers_count":31,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-08T17:16:44.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://component.github.io/autosuggest/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-26T17:05:23.000Z","updated_at":"2023-08-27T04:04:42.000Z","dependencies_parsed_at":"2022-09-07T23:31:37.805Z","dependency_job_id":null,"html_url":"https://github.com/component/autosuggest","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fautosuggest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fautosuggest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fautosuggest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fautosuggest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/autosuggest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229890523,"owners_count":18140109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T00:18:31.961Z","updated_at":"2024-12-16T00:18:32.500Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# autosuggest\n\n### Autosuggest values for text inputs\n\n`\u003cinput type=\"text\"\u003e` autosuggest component. [Try the demo][demo]!\n\nInspired from http://oak.cs.ucla.edu/cs144/projects/javascript/suggest1.html.\n\n## Installation\n\n```bash\n$ component install component/autosuggest\n```\n\n## Example\n\n```js\nvar autosuggest = require('autosuggest');\nvar input = document.querySelector('input[type=\"text\"]');\n\n// array of suggestions\nvar suggestions = [\n  'Sunday',\n  'Monday',\n  'Tuesday',\n  'Wednesday',\n  'Thursday',\n  'Friday',\n  'Saturday'\n];\n\n// create an `autosuggest` instance\nvar suggest = autosuggest(input, suggestions);\n\n// and you can change the array of suggestions to use if they get change\nvar newSuggestions = suggestions.concat([ 'Funday' ]);\nsuggest.set(newSuggestions);\n```\n\n## API\n\n### autosuggest(el, [suggestions]) → Autosuggest\n\nReturns an `Autosuggest` instance. The instance has `.start()` called on it if the\noptional `suggestions` array is given, otherwise you must call `.set(array)` and\n`.start()` manually.\n\n### .set(array)\n\nSets a new array of Strings to use as the suggestions for the `Autosuggest`\ninstance.\n\n#### .start()\n\nStarts the autosuggesting for the `Autosuggest` instance.\n\n#### .stop()\n\nStops the autosuggesting for the `Autosuggest` instance..\n\n## License\n\n  MIT\n\n[demo]: http://component.github.com/autosuggest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fautosuggest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fautosuggest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fautosuggest/lists"}