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

Function callersOf

__tests__/alias-binding-resolution.test.ts:38–42  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

36 };
37
38 const callersOf = (name: string): string[] => {
39 const target = cg.getNodesByKind('function').find((n) => n.name === name);
40 expect(target, `fixture symbol ${name} was not indexed`).toBeDefined();
41 return cg.getCallers(target!.id).filter(c => c.edge.kind === 'calls').map((c) => c.node.name);
42 };
43
44 it('follows `export const alias = fn`', async () => {
45 await index({

Calls 3

mapMethod · 0.80
getNodesByKindMethod · 0.65
getCallersMethod · 0.45

Tested by

no test coverage detected