(text: string, ending: "\r\n" | "\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; |
| 26 | } |
| 27 | |
| 28 | export function stripBom(content: string): { bom: string; text: string } { |
| 29 | return content.startsWith("\uFEFF") |
no test coverage detected