package
Remove a UTF8 BOM at the start of the stream.
npm install remove-bom-streamGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Remove a UTF8 BOM at the start of the stream.
var fs = require('fs');
var concat = require('concat-stream');
var removeBOM = require('remove-bom-stream');
fs.createReadStream('utf8-file-with-bom.txt')
.pipe(removeBOM('utf-8'))
.pipe(
concat(function (result) {
// result won't have a BOM
})
);removeBOM(encoding)Returns a Transform stream that will remove a BOM, if the argument encoding is 'utf-8' and the given data is a UTF8 Buffer with a BOM at the beginning. If the encoding is not 'utf-8' or does not have a BOM, the data is not changed and this becomes a no-op Transform stream.
MIT
phated
blaine.bublitz@gmail.com
Estimated unpacked size across 7 packages.
184.0 kB
Includes dependencies.