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

Function index

__tests__/js-instance-receiver-static-methods.test.ts:17–25  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

15let cg: CodeGraph | null = null;
16
17async function index(files: Record<string, string>): Promise<void> {
18 tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-static-instance-recv-'));
19 for (const [rel, content] of Object.entries(files)) {
20 const abs = path.join(tempDir, rel);
21 fs.mkdirSync(path.dirname(abs), { recursive: true });
22 fs.writeFileSync(abs, content);
23 }
24 cg = await CodeGraph.init(tempDir, { index: true });
25}
26
27/** The methods the function with this name calls, as `qualifiedName (file:line)`. */
28function methodsCalledBy(name: string): string[] {

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected