MCPcopy Index your code
hub / github.com/Waishnav/devspace / fileLines

Function fileLines

src/apply-patch.ts:400–406  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

398}
399
400function fileLines(content: string): string[] {
401 if (content.length === 0) return [];
402 const normalized = content.replace(/\r\n/g, "\n");
403 const lines = normalized.split("\n");
404 if (normalized.endsWith("\n")) lines.pop();
405 return lines;
406}
407
408function hunkRange(start: number, count: number): string {
409 return count === 0 ? "0,0" : `${start},${count}`;

Callers 1

unifiedFilePatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected