tiny-complete
Lightweight, dependency free type-ahead/autocomplete solution!
Install
npm i tiny-complete --save
Use
Bind to input:
<input type="text" id="startDate" />
<input type="text" id="endDate" />
In Javascript:
new TinyComplete({
element: '#element_id'
});
npm package-size
):
Benchmarking Size (Typeahead Packages | minified | Gzipped |
---|---|---|
tiny-complete | 3.31kB | 1.43kB |
Developing and contributing to tiny-complete
Folder structure
The main body of code is in index.js
The tests are in the spec/unit
directory. Please follow naming convention with xxxx.spec.js
Running tests
We use Jasmine The existing tests are in the spec folder.
Please write tests for new additions. We use codecov to test for complete unit test coverage.
Run all the tests:
npm test
Before submitting a pull request
Please make sure all code supports all versions of node. We write code in ES5 syntax for smaller size and browser compatibility.
We use ESLint for syntax consistency, and the linting rules are included in this repository. Running npm test
will check the linting rules as well. Please make sure your code has no linting errors before submitting a pull request.
npm run lint_fix
will also automatically fix any linting errors.