| 9 | |
| 10 | // DDOPSON-2012-04-28 - stealing this method from module.js ... seems pretty corner-case |
| 11 | function stripBOM(content) { |
| 12 | // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) |
| 13 | // because the buffer-to-string conversion in `fs.readFileSync()` |
| 14 | // translates it to FEFF, the UTF-16 BOM. |
| 15 | if (content.charCodeAt(0) === 0xFEFF) { |
| 16 | content = content.slice(1); |
| 17 | } |
| 18 | return content; |
| 19 | } |
| 20 | |
| 21 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 22 | // From: underscore.js |