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

Function levelOf

graph-ui/src/galaxy/graph-scope.ts:403–403  ·  view source on GitHub ↗
(node: GraphNode)

Source from the content-addressed store, hash-verified

401 */
402export function scopedHierarchy(scope: ScopedGraph, name: string): import('./hierarchy-layout').HierarchyProjection {
403 const levelOf = (node: GraphNode) => scope.roots.has(node.id) ? 0 : scope.levels?.get(node.id) ?? Math.max(0, Math.round(-node.z / 18));
404 const level = new Map(scope.data.nodes.map(node => [node.id, levelOf(node)] as const));
405 const incident = new Map<number, GraphEdge[]>();
406 for (const edge of scope.data.edges) {

Callers 1

scopedHierarchyFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected