Tests a query against a source using fuzzy matching
Matches a query against a source using fuzzy matching, returns information about the result
Surround parts of the string that matched with prefix and suffix
Can be used as a Array.prototype.filter callback.
You can use the
sourceAccessor option if you pass an array of objects that contains the string you want to match.
Can be used as a Array.prototype.sort callback.
If you have a large array of objects, you might want to pass
idAccessor as it creates a memoization table which reduces drastically how many times the fuzzy matching algorithm will be called.
sources.sortfuzzy'ssjs'sources.sortfuzzy'ssjs',// same, but will be faster thanks to memoizationsources.sortfuzzy'ssjs',
A scoring function is a function that given two context, returns a number (either positive or negative) that will be added the the match score.
A leading character is a character that matters more than others.
These are made of capitals and letters follwoing
Link to default strategy: here.
fuzzyjs is licensed under MIT License.