https://github.com/asmr-hex/autosuggestion
:pencil2: :clipboard: Generates suggestions for text completion. :floppy_disk: :school_satchel:
https://github.com/asmr-hex/autosuggestion
auto-complete auto-completion auto-suggest auto-suggestion autocomplete autosuggestion javascript typeahead typeahead-completions typescript-library
Last synced: about 2 months ago
JSON representation
:pencil2: :clipboard: Generates suggestions for text completion. :floppy_disk: :school_satchel:
- Host: GitHub
- URL: https://github.com/asmr-hex/autosuggestion
- Owner: asmr-hex
- License: gpl-3.0
- Created: 2021-02-19T00:29:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-14T23:02:21.000Z (over 5 years ago)
- Last Synced: 2025-09-03T14:52:30.340Z (10 months ago)
- Topics: auto-complete, auto-completion, auto-suggest, auto-suggestion, autocomplete, autosuggestion, javascript, typeahead, typeahead-completions, typescript-library
- Language: TypeScript
- Homepage: https://asmr-hex.github.io/autosuggestion
- Size: 1.47 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
autosuggestion
Generate dynamic, composable suggestions for text completion.
* suggest words/phrases by scope.
* define phrase-based suggestions.
* define lookup-based suggestions (recursive).
* dynamically add/remove suggestion patterns.
## Install
`autosuggestion` can be used in Node.js and browsers.
``` shell
npm install autosuggestion
```
## Import
``` javascript
// ES Module (ESM)
import { Dictionary } from 'autosuggestion'
```
``` javascript
// CommonJS (CJS)
const autosuggestion = require('autosuggestion')
```
``` html
```
## Getting Started
For more details, see [documentation](https://asmr-hex.github.io/autosuggestion).
###### Creating a `Dictionary`
``` javascript
const dictionary = new Dictionary()
```
## Examples
* [basic](https://asmr-hex.github.com/autosuggestion/examples/browser/basic.html)
* [dynamic](https://asmr-hex.github.com/autosuggestion/examples/browser/dynamic.html)
* [context-free grammar](https://asmr-hex.github.io/autosuggestion/examples/browser/basic-cfg.html)
* [dynamic context-free grammar](https://asmr-hex.github.io/autosuggestion/examples/browser/dynamic-cfg.html)
list of live example pages
brief section descriptions of each feature
## Releasing
1. run `npm version major|minor|patch`
2. create release on github manually (triggers a github workflow to publish tp npm)
eventually, consider using [semantic-release](https://github.com/semantic-release/semantic-release)
## Todo
#### General
- [x] automate test coverage reporting
- [ ] get 100% test coverage
- [ ] clean up and restructure code
- [x] setup ci for coverage report + doc generation + npm publishing (look into tags as a mechanism for publishing)
- [x] generate badges with [shields.io](https://github.com/badges/shields)
- [ ] include doc comments for typedoc
- [x] fill out readme
- [x] update package.json
- [x] update github
- [x] update package (use latest package from unpkg.org in browser examples)
- [x] host documentation
#### Documentation
- [x] Dictionary
- [x] Scope
- [ ] Suggestion
- [ ] Node
- [x] types
#### Features
- [ ] make Dictionary API handle multiple input data shapes
- [ ] suggestion token annotations (context, etc.)
- [ ] configuration (lookup brackets, etc.)
#### Examples
- [x] examples landing page (browser) (or link in docs)
- [x] simple, dynamic dictionary (browser)
- [x] complex, dynamic CFG (browser)
- [ ] lookahead configuration (browser)
- [ ] large dictionary (browser)
- [ ] basic (nodejs)