remove-bom-stream
Remove a UTF8 BOM at the start of the stream.
Last updated 4 years ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remove-bom-stream 
SYNC missed versions from official npm registry.

remove-bom-stream

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

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

Current Tags

  • 1.2.0                                ...           latest (4 years ago)

3 Versions

  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 263
This Week 263
This Month 46,551
Last Day 825
Last Week 14,950
Last Month 69,325
Dependencies (3)
Dev Dependencies (11)

Copyright 2014 - 2017 © taobao.org |