MCPcopy Create free account
hub / github.com/arktypeio/arktype / termsOf

Function termsOf

ark/docs/components/shell/SearchPanel.tsx:46–50  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

44
45/** a text's terms, split as MiniSearch's tokenizer splits them */
46const termsOf = (text: string) =>
47 text
48 .split(/[\n\r\p{Z}\p{P}]+/u)
49 .filter(Boolean)
50 .map(fold)
51
52const compact = (text: string) => text.replaceAll(/[\s-]/g, "")
53

Callers 2

loadFunction · 0.85
boostOfFunction · 0.85

Calls 2

filterMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected