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

Function referencesFrom

__tests__/extraction.test.ts:8004–8010  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

8002 ' */',
8003 ];
8004 const referencesFrom = (file: string): Array<[string | undefined, number | undefined, number | undefined]> => {
8005 const fileNode = cg.getNodesInFile(file).find((n) => n.kind === 'file')!;
8006 return cg.getOutgoingEdges(fileNode.id)
8007 .filter((e) => e.kind === 'references')
8008 .map((e): [string | undefined, number | undefined, number | undefined] => [cg.getNode(e.target)?.filePath, e.line, e.column])
8009 .sort((a, b) => a[1]! - b[1]!);
8010 };
8011
8012 it.each(['\n', '\r\n'])('links the sections an editor-saved template and section group list, where each `type` is (%j)', async (newline) => {
8013 // JSON.parse rejects the editor's comment, so such a file linked none of

Callers 1

extraction.test.tsFile · 0.70

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
getNodesInFileMethod · 0.65
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected