Skip to content

A simple autocomplete Javascript library.

Notifications You must be signed in to change notification settings

thomasbrq/simple-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-autocomplete

simple-autocomplete is a Javascript library that lets you quickly and easily add an autocomplete to your app.

Usage

const autocomplete = new Autocomplete(["hello", "hell", "helium"]);

autocomplete.search("hel"); // -> [ "hello", "hell", "helium" ]
autocomplete.search("hell"); // -> [ "hello", "hell" ]

autocomplete.add("hola") // add a new word

autocomplete.search("hol"); // -> [ "hola" ]
autocomplete.search("meu"); // -> [  ]