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

Function index

__tests__/js-import-binding-scope.test.ts:23–31  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

21let cg: CodeGraph | null = null;
22
23async function index(files: Record<string, string>): Promise<void> {
24 tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-import-scope-'));
25 for (const [rel, content] of Object.entries(files)) {
26 const abs = path.join(tempDir, rel);
27 fs.mkdirSync(path.dirname(abs), { recursive: true });
28 fs.writeFileSync(abs, content);
29 }
30 cg = await CodeGraph.init(tempDir, { index: true });
31}
32
33/** The calls made by the function or method with this qualified name, as `kind qualifiedName (file:line)`. */
34function callsFrom(qualifiedName: string): string[] {

Callers 1

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected