(text: string)
| 18 | } |
| 19 | |
| 20 | export function normalizeToLF(text: string): string { |
| 21 | return text.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); |
| 22 | } |
| 23 | |
| 24 | export function restoreLineEndings(text: string, ending: "\r\n" | "\n"): string { |
| 25 | return ending === "\r\n" ? text.replace(/\n/g, "\r\n") : text; |
no test coverage detected