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

Function write

__tests__/framework-hint-resolver-only.test.ts:25–28  ·  view source on GitHub ↗
(rel: string, content: string)

Source from the content-addressed store, hash-verified

23 let root: string;
24 let cg: CodeGraph | undefined;
25 const write = (rel: string, content: string) => {
26 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
27 fs.writeFileSync(path.join(root, rel), content);
28 };
29 const navigates = (): number => {
30 const nodes = cg!.getNodesInFile('src/routes/+layout.svelte');
31 return cg!.getOutgoingEdgesFrom(nodes.map((n) => n.id)).filter((e) => e.kind === 'navigates').length;

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected