Skip to content

Autocomplete in javascript using trie data structure

Notifications You must be signed in to change notification settings

niklabh/autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autocomplete

Build Status

Autocomplete utility using trie data structure in javascript. A demo is hosted at http://linkm.in/autocompleteweb/

Usage

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.

API

getWords(key, limit)

add(word)

TODO

  • ES6

About

Autocomplete in javascript using trie data structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published