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

Function index

__tests__/alias-binding-resolution.test.ts:29–36  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

27 });
28
29 const index = async (files: Record<string, string>): Promise<void> => {
30 dir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-alias-'));
31 for (const [name, content] of Object.entries(files)) {
32 fs.writeFileSync(path.join(dir, name), content);
33 }
34 cg = CodeGraph.initSync(dir, { config: { include: ['**/*.ts', '**/*.js'], exclude: [] } });
35 await cg.indexAll();
36 };
37
38 const callersOf = (name: string): string[] => {
39 const target = cg.getNodesByKind('function').find((n) => n.name === name);

Calls 3

initSyncMethod · 0.80
joinMethod · 0.45
indexAllMethod · 0.45

Tested by

no test coverage detected