Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: strip BOM when reading JSON files
fs.readFile* don't strip the BOM header, even when specifying 'utf8' as the encoding, and JSON.parse() doesn't handle it either. There are technically a bunch of BOM indicators, but this is the one seen most commonly and actually appears in a number of package.json files in the wild. See nodejs/node#6924, nodejs/node#3040 for background.
- Loading branch information