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

Function lastPart

graph-ui/src/browser-ai/question-intent.ts:187–187  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

185 const add = (text: string) => { for (const word of text.match(/[\p{L}\p{N}_][\p{L}\p{N}_.-]*/gu) ?? []) words.add(word.toLowerCase()); };
186 sources.texts.forEach(add);
187 const lastPart = (name: string) => (name.split(/[/.:]/).filter(Boolean).pop() ?? name).toLowerCase();
188 sources.names.forEach(name => { words.add(name.toLowerCase()); words.add(lastPart(name)); });
189 const galaxy = sources.galaxy;
190 if (galaxy) for (const group of [...galaxy.relationships.incoming, ...galaxy.relationships.outgoing]) for (const file of group.files) file.symbols.forEach(symbol => words.add(symbol.name.toLowerCase()));

Callers 1

knownNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected