MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / tokenizeSearchText

Function tokenizeSearchText

packages/core/execution/src/tool-invoker.ts:485–489  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

483 .trim();
484
485const tokenizeSearchText = (value: string): string[] =>
486 normalizeSearchText(value)
487 .split(/[^a-z0-9]+/)
488 .map((token) => token.trim())
489 .filter(Boolean);
490
491const prepareField = (value?: string): PreparedField => ({
492 raw: normalizeSearchText(value ?? ""),

Callers 4

prepareFieldFunction · 0.85
matchesNamespaceFunction · 0.85
scoreToolMatchFunction · 0.85
tool-invoker.tsFile · 0.85

Calls 1

normalizeSearchTextFunction · 0.85

Tested by

no test coverage detected