(filePath, { marker } = {})
| 11 | } |
| 12 | |
| 13 | function loadPatchText(filePath, { marker } = {}) { |
| 14 | const target = assertFileExists(filePath); |
| 15 | const original = readText(target); |
| 16 | return { original, alreadyPatched: !!(marker && original.includes(marker)) }; |
| 17 | } |
| 18 | |
| 19 | function savePatchText(filePath, text, { marker } = {}) { |
| 20 | const next = marker ? ensureMarker(String(text ?? ""), marker) : String(text ?? ""); |
no test coverage detected