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

Function codeShaped

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

Source from the content-addressed store, hash-verified

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". */
31function same(left: string, right: string): boolean {
32 if (left === right) return true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected