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

Function callsAt

__tests__/ruby-singleton-methods.test.ts:151–157  ·  view source on GitHub ↗

` : ` of the method each `calls` edge written on `line` of `file` reaches.

(graph: CodeGraph, file: string, line: number)

Source from the content-addressed store, hash-verified

149
150/** `<qualified name>:<line>` of the method each `calls` edge written on `line` of `file` reaches. */
151function callsAt(graph: CodeGraph, file: string, line: number): string[] {
152 const ids = graph.getNodesInFile(file).map((n) => n.id);
153 return graph.getOutgoingEdgesFrom(ids)
154 .filter((e) => e.kind === 'calls' && e.line === line)
155 .map((e) => { const t = graph.getNode(e.target)!; return `${t.qualifiedName}:${t.startLine}`; })
156 .sort();
157}
158
159const backends = [
160 ['kernel', getKernel() === null],

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected