{"id":20824305,"url":"https://github.com/asmr-hex/autosuggestion","last_synced_at":"2026-04-30T19:32:03.362Z","repository":{"id":53906898,"uuid":"340214976","full_name":"asmr-hex/autosuggestion","owner":"asmr-hex","description":":pencil2:  :clipboard: Generates suggestions for text completion. :floppy_disk: :school_satchel:","archived":false,"fork":false,"pushed_at":"2021-03-14T23:02:21.000Z","size":1545,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T14:52:30.340Z","etag":null,"topics":["auto-complete","auto-completion","auto-suggest","auto-suggestion","autocomplete","autosuggestion","javascript","typeahead","typeahead-completions","typescript-library"],"latest_commit_sha":null,"homepage":"https://asmr-hex.github.io/autosuggestion","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asmr-hex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-19T00:29:54.000Z","updated_at":"2023-12-01T08:12:28.000Z","dependencies_parsed_at":"2022-08-13T04:00:47.464Z","dependency_job_id":null,"html_url":"https://github.com/asmr-hex/autosuggestion","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/asmr-hex/autosuggestion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmr-hex%2Fautosuggestion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmr-hex%2Fautosuggestion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmr-hex%2Fautosuggestion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmr-hex%2Fautosuggestion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asmr-hex","download_url":"https://codeload.github.com/asmr-hex/autosuggestion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmr-hex%2Fautosuggestion/sbom","scorecard":{"id":212597,"data":{"date":"2025-08-11","repo":{"name":"github.com/asmr-hex/autosuggestion","commit":"059a1b2f4ef058d81c8d218128ad7b204f4a5efa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/coverage.yml:1","Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/coverage.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/coverage.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/npm-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/npm-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/asmr-hex/autosuggestion/tests.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/coverage.yml:16","Warn: npmCommand not pinned by hash: .github/workflows/npm-publish.yml:17","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:22","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"36 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T01:01:36.975Z","repository_id":53906898,"created_at":"2025-08-17T01:01:36.975Z","updated_at":"2025-08-17T01:01:36.975Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["auto-complete","auto-completion","auto-suggest","auto-suggestion","autocomplete","autosuggestion","javascript","typeahead","typeahead-completions","typescript-library"],"created_at":"2024-11-17T22:21:48.450Z","updated_at":"2026-04-30T19:32:03.340Z","avatar_url":"https://github.com/asmr-hex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" style=\"margin-bottom:0px;\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/asmr-hex/autosuggestion/main/logo.svg\"\n        height=\"130\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\" style=\"margin-top:0px;letter-spacing:0.2em;color:dimgrey\"\u003e\n    autosuggestion\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003c!-- test badge --\u003e\n    \u003ca href=\"https://github.com/asmr-hex/autosuggestion/actions/workflows/tests.yml\" alt=\"tests\"\u003e\n        \u003cimg src=\"https://github.com/asmr-hex/autosuggestion/actions/workflows/tests.yml/badge.svg\"/\u003e\n    \u003c/a\u003e\n    \u003c!-- coverage badge --\u003e\n    \u003ca href=\"https://asmr-hex.github.io/autosuggestion/coverage\"\u003e\n        \u003cimg src=\"https://img.shields.io/endpoint?url=https://api.keyvalue.xyz/437c1f94/coverage\" alt=\"test coverage\"\u003e\n    \u003c/a\u003e\n    \u003c!-- docs badge --\u003e\n    \u003ca href=\"https://asmr-hex.github.io/autosuggestion\" alt=\"documentation\"\u003e\n        \u003cimg src=\"https://img.shields.io/static/v1?label=typedoc\u0026message=docs\u0026color=informational\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- npm version badge --\u003e\n    \u003ca href=\"https://badge.fury.io/js/autosuggestion\"\u003e\n        \u003cimg src=\"https://badge.fury.io/js/autosuggestion.svg\" alt=\"npm version\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nGenerate dynamic, composable suggestions for text completion.\n* suggest words/phrases by scope.\n* define phrase-based suggestions.\n* define lookup-based suggestions (recursive).\n* dynamically add/remove suggestion patterns.\n\n## Install\n`autosuggestion` can be used in Node.js and browsers.\n``` shell\nnpm install autosuggestion\n```\n\n## Import\n``` javascript\n// ES Module (ESM)\nimport { Dictionary } from 'autosuggestion'\n```\n``` javascript\n// CommonJS (CJS)\nconst autosuggestion = require('autosuggestion')\n```\n``` html\n\u003c!-- HTML Script Tag  --\u003e\n\u003cscript type='text/javascript' src='https://unpkg.com/autosuggestion'\u003e\u003c/script\u003e\n```\n\n## Getting Started\nFor more details, see [documentation](https://asmr-hex.github.io/autosuggestion).\n\n###### Creating a `Dictionary`\n``` javascript\nconst dictionary = new Dictionary()\n```\n\n## Examples\n* [basic](https://asmr-hex.github.com/autosuggestion/examples/browser/basic.html)\n* [dynamic](https://asmr-hex.github.com/autosuggestion/examples/browser/dynamic.html)\n* [context-free grammar](https://asmr-hex.github.io/autosuggestion/examples/browser/basic-cfg.html)\n* [dynamic context-free grammar](https://asmr-hex.github.io/autosuggestion/examples/browser/dynamic-cfg.html)\n\nlist of live example pages\nbrief section descriptions of each feature\n\n## Releasing\n1. run `npm version major|minor|patch`\n2. create release on github manually (triggers a github workflow to publish tp npm)\n\neventually, consider using [semantic-release](https://github.com/semantic-release/semantic-release)\n\n## Todo\n#### General\n- [x] automate test coverage reporting\n- [ ] get 100% test coverage\n- [ ] clean up and restructure code\n- [x] setup ci for coverage report + doc generation + npm publishing (look into tags as a mechanism for publishing)\n- [x] generate badges with [shields.io](https://github.com/badges/shields)\n- [ ] include doc comments for typedoc\n- [x] fill out readme\n- [x] update package.json\n- [x] update github\n- [x] update package (use latest package from unpkg.org in browser examples)\n- [x] host documentation\n#### Documentation\n- [x] Dictionary\n- [x] Scope\n- [ ] Suggestion\n- [ ] Node\n- [x] types\n#### Features\n- [ ] make Dictionary API handle multiple input data shapes\n- [ ] suggestion token annotations (context, etc.)\n- [ ] configuration (lookup brackets, etc.)\n#### Examples\n- [x] examples landing page (browser) (or link in docs)\n- [x] simple, dynamic dictionary (browser)\n- [x] complex, dynamic CFG (browser)\n- [ ] lookahead configuration (browser)\n- [ ] large dictionary (browser)\n- [ ] basic (nodejs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmr-hex%2Fautosuggestion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmr-hex%2Fautosuggestion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmr-hex%2Fautosuggestion/lists"}