awesomplete
awesomplete copied to clipboard
Feature: FuzzySearch
It would be great if there would be an option to support fuzzy matching. Maybe this library by @bevacqua will help: https://github.com/bevacqua/fuzzysearch
@marcobiedermann you can implement this in awesomplete's current form using the filter option
I think the question was about providing support out of the box, which we shouldn't probably do despite https://github.com/bevacqua/fuzzysearch being excellent.
As @Secretmapper mentioned we can use filter. Sadly the arguments order in filter
and fuzzysearch
is reversed, so:
filter: function (text, input) {
return fuzzysearch(input, text);
}
Would it be possible to post a demo link with the filter code and fuzzysearch?
What is the case against providing it out of the box? Just a matter of avoiding a dependency?
Also, what does fuzzysearch do that isn't already being done in awesomplete?
At this point the last commit in fuzzysearch was in 2016, so even if this becomes baked in, perhaps another library would be more suitable? Though I do think it's better suited as a(n official) plugin.