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

Function referencesFrom

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

Source from the content-addressed store, hash-verified

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