(text: string, bom: boolean)
| 178 | } |
| 179 | |
| 180 | function joinBom(text: string, bom: boolean) { |
| 181 | const stripped = splitBom(text).text |
| 182 | return bom ? `\uFEFF${stripped}` : stripped |
| 183 | } |
| 184 | |
| 185 | function hasUtf8Bom(content: Uint8Array) { |
| 186 | return content[0] === 0xef && content[1] === 0xbb && content[2] === 0xbf |
no test coverage detected