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

Function pairs

__tests__/ui-filecode-api.test.ts:77–84  ·  view source on GitHub ↗

Rows as `caller -> callee`, which is how the rail reads.

(payload: any)

Source from the content-addressed store, hash-verified

75
76/** Rows as `caller -> callee`, which is how the rail reads. */
77function pairs(payload: any): string[] {
78 const names = new Map<string, string>(
79 payload.outline.items.map((e: any) => [e.id, e.name] as [string, string])
80 );
81 return payload.calls.items.map(
82 (c: any) => `${names.get(c.ownerId) ?? 'file'} -> ${c.relation.node.name}`
83 );
84}
85
86beforeAll(async () => {
87 tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-ui-filecode-'));

Callers 1

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected