Package Exports
- remove-bom-stream
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remove-bom-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
remove-bom-stream
Remove a UTF8 BOM at the start of the stream.
Usage
var fs = require('fs');
var concat = require('concat-stream');
var removeBOM = require('remove-bom-stream');
fs.createReadStream('utf8-file-with-bom.txt')
.pipe(removeBOM())
.pipe(concat(function(result) {
// result won't have a BOM
}));
API
removeBOM()
Returns a through2
stream that will remove a BOM, given the data is a UTF8 Buffer with a BOM at the beginning. If the data is not UTF8 or does not have a BOM, the data is not changed and this becomes a normal passthrough stream.
License
MIT