prepareFuzzySearch() function
Construct a fuzzy search callback that runs on a target string. Performance may be an issue if you are running the search for more than a few thousand times. If performance is a problem, consider using prepareSimpleSearch
instead.
Signature:
export function prepareFuzzySearch(query: string): (text: string) => SearchResult | null;
Parameters
Parameter | Type | Description |
---|---|---|
query | string | the fuzzy query. fn - the callback function to apply the search on. |
Returns:
(text: string) =>
SearchResult
| null