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

Function parentPath

graph-ui/src/architecture/semantic-graph.ts:208–208  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

206const hierarchyPath = (path: string | undefined) => !path || path === '{}' ? undefined
207 : path.replaceAll('\\', '/').replace(/^\.\//, '').replace(/\/+/g, '/').replace(/\/$/, '');
208const parentPath = (path: string) => path.includes('/') ? path.slice(0, path.lastIndexOf('/')) : '';
209const hierarchyNodeOrder = (a: SemanticNode, b: SemanticNode) => compare(hierarchyPath(a.filePath) ?? a.areaPath ?? '', hierarchyPath(b.filePath) ?? b.areaPath ?? '')
210 || (a.line ?? 0) - (b.line ?? 0) || compare(a.id, b.id);
211

Callers 1

layoutFolderHierarchyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected