prepareSimpleSearch
Official
Construct a simple search callback that runs on a target string.
Import:
import { prepareSimpleSearch } from 'obsidian';Signature:
function prepareSimpleSearch(query: string): (text: string) => SearchResult | nullParameters:
| Parameter | Type | Description |
|---|---|---|
query | string | the space-separated words. |
Returns: (text: string) => SearchResult | null — fn - the callback export function to apply the search on or null if the query is empty.