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

Function callerCount

__tests__/sync.test.ts:759–764  ·  view source on GitHub ↗
(fnName: string)

Source from the content-addressed store, hash-verified

757 });
758
759 function callerCount(fnName: string): number {
760 const results = cg.searchNodes(fnName);
761 const def = results.map(r => r.node).find(n => n.kind === 'function' && n.name === fnName);
762 if (!def) return -1;
763 return cg.getCallers(def.id).length;
764 }
765
766 it('preserves incoming cross-file calls edges when the callee file is re-indexed', async () => {
767 // Baseline: both callees have one cross-file caller each.

Callers 2

handleExploreMethod · 0.85
sync.test.tsFile · 0.85

Calls 3

mapMethod · 0.80
searchNodesMethod · 0.65
getCallersMethod · 0.45

Tested by

no test coverage detected