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

Function calls

__tests__/member-value-module-function.test.ts:210–217  ·  view source on GitHub ↗

The functions `name` calls.

(cg: CodeGraph | undefined, name: string)

Source from the content-addressed store, hash-verified

208
209 /** The functions `name` calls. */
210 function calls(cg: CodeGraph | undefined, name: string): string[] {
211 const from = cg!.getNodesByKind('function').find((n) => n.name === name);
212 return cg!
213 .getOutgoingEdges(from!.id)
214 .filter((e) => e.kind === 'calls')
215 .map((e) => cg!.getNode(e.target)!.qualifiedName)
216 .sort();
217 }
218
219 describe('Python', () => {
220 it('does not take an attribute handed to a call for the function of its name', () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesByKindMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected