prepareSimpleSearch() function
Construct a simple search callback that runs on a target string.
Signature:
export function prepareSimpleSearch(query: string): (text: string) => SearchResult | null;
Parameters
Parameter | Type | Description |
---|---|---|
query | string | the space-separated words fn - the callback function to apply the search on |
Returns:
(text: string) =>
SearchResult
| null