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

Function owner

__tests__/extraction.test.ts:1789–1795  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

1787 const result = extractFromSource('lib.rs', code);
1788 const byId = new Map(result.nodes.map((n) => [n.id, n]));
1789 const owner = (name: string) => {
1790 const u = result.unresolvedReferences.find(
1791 (r) => r.referenceKind === 'calls' && r.referenceName === name
1792 );
1793 const n = u ? byId.get(u.fromNodeId) : undefined;
1794 return n ? `${n.kind}:${n.name}` : undefined;
1795 };
1796 expect(owner('compute_len')).toBe('variable:LEN');
1797 expect(owner('build_cfg')).toBe('variable:REGISTRY');
1798 });

Callers 1

extraction.test.tsFile · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected