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

Function node

__tests__/go-var-groups.test.ts:114–118  ·  view source on GitHub ↗
(kind: string, name: string)

Source from the content-addressed store, hash-verified

112 const result = extract(backend, crlf ? SOURCE.replace(/\n/g, '\r\n') : SOURCE);
113 const byName = new Map(result.nodes.map((n) => [`${n.kind} ${n.name}`, n]));
114 const node = (kind: string, name: string) => {
115 const found = byName.get(`${kind} ${name}`);
116 expect(found, `${kind} ${name}`).toBeDefined();
117 return found!;
118 };
119 const file = result.nodes.find((n) => n.kind === 'file')!;
120
121 // Every member of a var group is a variable the file contains, with its

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected