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

Function node

__tests__/js-default-export-object-members.test.ts:62–66  ·  view source on GitHub ↗

The one node with this qualified name in `file`.

(g: CodeGraph, qualifiedName: string, file: string)

Source from the content-addressed store, hash-verified

60
61 /** The one node with this qualified name in `file`. */
62 function node(g: CodeGraph, qualifiedName: string, file: string) {
63 const found = g.getNodesByQualifiedName(qualifiedName).filter((n) => n.filePath === file);
64 expect(found, `${qualifiedName}@${file}`).toHaveLength(1);
65 return found[0]!;
66 }
67 /** `qualifiedName@file` at the other end of a node's `calls` edges. */
68 const calls = (g: CodeGraph, id: string, direction: 'in' | 'out') =>
69 (direction === 'in' ? g.getIncomingEdges(id) : g.getOutgoingEdges(id))

Callers 3

calleesFunction · 0.70
callersFunction · 0.70

Calls 1

Tested by

no test coverage detected