MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / wordsOf

Function wordsOf

graph-ui/src/browser-ai/echo-answer.ts:27–27  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

25const RESTATED_WORDS = 3;
26
27const wordsOf = (text: string): string[] => (text.match(/`[^`]+`|[\p{L}\p{N}_][\p{L}\p{N}_.:/-]*/gu) ?? []).map(word => word.replace(/[.:/-]+$/, '')).filter(Boolean);
28/** A name, path or number: something the question did not say is information, however short the answer. */
29const codeShaped = (word: string): boolean => /^`|\p{N}|_|[./:]|\p{Ll}\p{Lu}|\p{Lu}{2}\p{Ll}/u.test(word);
30/** The same word, mistyped or inflected: "Heirarchy" for "heirarchie", "erklärt" for "erkläre". */

Callers 1

echoAnswerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected