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

Function joinText

src/installer/targets/shared.ts:280–284  ·  view source on GitHub ↗
(text: TextLines)

Source from the content-addressed store, hash-verified

278
279/** The lines joined with the file's own line break, ending with one; no trailing blank lines. */
280export function joinText(text: TextLines): string {
281 const lines = [...text.lines];
282 while (lines.length > 0 && (lines[lines.length - 1] ?? '').trim() === '') lines.pop();
283 return lines.length === 0 ? '' : lines.join(text.eol) + text.eol;
284}
285
286/** One marker-delimited block: `start` is the start marker's offset, `end` is just past the end marker. */
287interface MarkedSection {

Callers 4

uninstallMethod · 0.90
writeHermesConfigFunction · 0.90
writePatchFunction · 0.90
removeFromPatchFunction · 0.90

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected