{"id":20077598,"url":"https://github.com/digitaledgeit/js-autosuggest","last_synced_at":"2026-06-13T09:05:32.325Z","repository":{"id":74283362,"uuid":"20795555","full_name":"digitaledgeit/js-autosuggest","owner":"digitaledgeit","description":"An auto suggest input.","archived":false,"fork":false,"pushed_at":"2015-03-09T04:20:48.000Z","size":350,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T23:10:11.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/digitaledgeit.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-06-13T07:15:39.000Z","updated_at":"2015-03-09T04:20:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9fd2463-db8f-40ce-a040-1783a7e12777","html_url":"https://github.com/digitaledgeit/js-autosuggest","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/digitaledgeit/js-autosuggest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-autosuggest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-autosuggest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-autosuggest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-autosuggest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaledgeit","download_url":"https://codeload.github.com/digitaledgeit/js-autosuggest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-autosuggest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34278212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T15:09:07.513Z","updated_at":"2026-06-13T09:05:32.283Z","avatar_url":"https://github.com/digitaledgeit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autosuggest\n\nAn auto suggest input.\n\n## Installation\n\n\tcomponent install digitaledgeit/js-autosuggest\n\n## Setup\n\n\t\tvar presenter = require('autosuggest')({\n            el:             document.querySelector('.js-autosuggest'),\n            source:         matcher(countries, {properties: ['name'], limit: 6, ignore_case: true}),\n\t        display:        'name',\n            template:       function(query, country) {\n                return '\u003cdiv class=\"country__code\"\u003e'+country.code+'\u003c/div\u003e\u003cdiv class=\"country__name\"\u003e'+country.name+'\u003c/div\u003e';\n            },\n\t        minLength: 1,\n\t        hideDropDownIfEmpty: true,\n            listItemClasses: 'country'\n        });\n\n## API\n\n### new Autosuggest(options : object)\n\n#### Options\n\n- `hint` \t\t-\n- `highlight` \t-\n- `minlength` \t- The minimum number of characters the user must enter before any suggestions are fetched.\n- `canSuggest`    - A function that determines whether a suggestion should be made for the query\n\n- `source` \t\t- A suggestion source - an array of suggestions, a `function(query : string)` that returns an array of suggestions or a `function(query : string, done : function(suggestions : array))` that calls the `done` method.\n- `display`\t\t-\n- `template`\t-\n\n- selectItemWhenTabPressed - Select items when the user presses tab and an item in the drop down list is selected (using the arrow keys)\n\n### .open()\n\nOpen the dropdown menu.\n\n### .close()\n\nClose the dropdown menu.\n\n### .getValue()\n\nGet the current input value.\n\n### .setValue(value)\n\nSet the current input value.\n\n### .focus()\n\nFocus the input element.\n\n## Events\n\n- `opened` \t\t- Triggered when the dropdown menu is opened.\n- `closed` \t\t- Triggered when the dropdown menu is closed.\n- `suggested` \t- Triggered when a suggestion is displayed in a dropdown. Passed the suggestion objects.\n- `selected` \t- Triggered when a suggestion is selected from the dropdown. Passed the suggestion object.\n\n- `blur` \t\t- Triggered\n- `change` \t\t-\n\n## Matcher\n\n\n## Example\n\n1. Run `component build --dev`\n2. Open `test\\example\\countries.html`\n\n## Test\n\n1. Run `component build --dev`\n2. Run `component test phantom`\n\n## Troubleshooting\n\n*Note*: Requires the following shims for IE8:\n\n- bind\n- classList\n- indexOf\n- event.preventDefault\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-autosuggest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaledgeit%2Fjs-autosuggest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-autosuggest/lists"}