Autocomplete utility using trie data structure in javascript. A demo is hosted at http://linkm.in/autocompleteweb/
var autoComplete = require('autocompletor');
const opts = {
dictionary: 'PATH_TO_DICTIONARY_FILE'
};
autoComplete(opts, function(err, dictionary) {
dictionary.getWord("hac", 10);
});
If not provided default '/usr/share/dict/words' will be picked on unix machines.
- ES6