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

Function stripLastExtension

graph-ui/src/app/module-qn.ts:54–62  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

52 * (`.gitignore`), behaelt sie: sonst bliebe ein leerer Name uebrig.
53 */
54export function stripLastExtension(path: string): string {
55 const slash = path.lastIndexOf('/');
56 const base = slash === -1 ? path : path.slice(slash + 1);
57 const dot = base.lastIndexOf('.');
58 if (dot <= 0) {
59 return path;
60 }
61 return (slash === -1 ? '' : path.slice(0, slash + 1)) + base.slice(0, dot);
62}
63
64/** Der qualifizierte Name des Modul-Knotens, den der Graph fuer diese Datei fuehrt. */
65export function moduleQualifiedName(project: string, filePath: string): string {

Callers 2

module-qn.test.tsFile · 0.90
moduleQualifiedNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected