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

Function remove

__tests__/installer-targets.test.ts:2242–2246  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

2240 return { action, after: fs.readFileSync(file, 'utf-8') };
2241 }
2242 function remove(content: string): { action: string; after: string | null } {
2243 fs.writeFileSync(file, content);
2244 const action = removeMarkedSection(file, START, END);
2245 return { action, after: fs.existsSync(file) ? fs.readFileSync(file, 'utf-8') : null };
2246 }
2247
2248 it('a stray start marker on the first line no longer reduces the file to the block (the report)', () => {
2249 const { action, after } = upsert(`${STRAY}${NOTES}\n\n${LEGACY_BLOCK}\n`);

Callers 1

Calls 1

removeMarkedSectionFunction · 0.90

Tested by

no test coverage detected