There are a lot of Javascript implementations of searching or fuzzy (approximate string) matching and filtering. Here you can see how each one deals with finding words from a corpus of 22282 words so you can choose which one will fit better your autocompletion or fulltext search needs.
Go to https://fiatjaf.github.io/search-comparison/ and type anything in the input box to try out.
These are no performance tests, just a way to visualize the results each library yields.