MCPcopy
hub / github.com/colbymchenry/codegraph / callerCount

Function callerCount

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

Source from the content-addressed store, hash-verified

487 });
488
489 function callerCount(fnName: string): number {
490 const results = cg.searchNodes(fnName);
491 const def = results.map(r => r.node).find(n => n.kind === 'function' && n.name === fnName);
492 if (!def) return -1;
493 return cg.getCallers(def.id).length;
494 }
495
496 it('preserves incoming cross-file calls edges when the callee file is re-indexed', async () => {
497 // Baseline: both callees have one cross-file caller each.

Callers 2

handleExploreMethod · 0.85
sync.test.tsFile · 0.85

Calls 2

searchNodesMethod · 0.45
getCallersMethod · 0.45

Tested by

no test coverage detected