MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / weightOf

Function weightOf

__tests__/ui-map-model.test.ts:487–487  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

485 const links = [link('src/db', 'src/types', 20), link('src/cli', 'src/db', 20)];
486 const layout = buildMapLayout({ modules, links }, OPTS);
487 const weightOf = (id: string) => layout.nodes.find((n) => n.id === id)!.weight;
488
489 expect(weightOf('src/types')).toBe(1);
490 expect(weightOf('src/db')).toBeCloseTo(0.5, 5);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected