Implementing autofill in a chrome extension using data from

I am trying to make a search bar in a chrome extension that uses data stored using the I want the search bar to automatically recommend relevant(matching) options on each key press using the data in the storage(like google autocomplete). I have thought about using tries but tries are too memory intensive. Is there any other way to implement this using javascript?