prepareFuzzySearch

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

ParameterTypeDescription
querystringthe fuzzy query. fn - the callback function to apply the search on.

Returns:

(text: string) => SearchResult | null