MCPcopy Create free account
hub / github.com/observablehq/framework / processTerm

Function processTerm

src/search.ts:25–27  ·  view source on GitHub ↗
(term: string)

Source from the content-addressed store, hash-verified

23 fields: ["title", "text", "keywords"], // fields to return with search results
24 storeFields: ["title"],
25 processTerm(term: string) {
26 return (term.match(/\p{N}/gu)?.length ?? 0) > 6 ? null : term.slice(0, 15).toLowerCase();
27 }
28};
29
30type MiniSearchResult = Omit<SearchResult, "path" | "keywords"> & {id: string; keywords: string};

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected