prepareSimpleSearch

prepareSimpleSearch() function

Construct a simple search callback that runs on a target string.

Signature:

export function prepareSimpleSearch(query: string): (text: string) => SearchResult | null;

Parameters

ParameterTypeDescription
querystringthe space-separated words fn - the callback function to apply the search on

Returns:

(text: string) => SearchResult | null