An open API service indexing awesome lists of open source software.

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:

Awesome Lists containing this project

README

          





autosuggestion









test coverage







npm version

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)