strip-bom-stream
Strip UTF-8 byte order mark (BOM) from a stream
Last updated 4 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install strip-bom-stream 
SYNC missed versions from official npm registry.

strip-bom-stream

Strip UTF-8 byte order mark (BOM) from a stream

From Wikipedia:

The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.

Install

$ npm install strip-bom-stream

Usage

import fs from 'node:fs';
import stripBomStream from 'strip-bom-stream';

fs.createReadStream('unicorn.txt')
	.pipe(stripBomStream())
	.pipe(fs.createWriteStream('unicorn.txt'));

It's a Transform stream.

Related

Current Tags

  • 5.0.0                                ...           latest (4 years ago)

3 Versions

  • 5.0.0                                ...           4 years ago
  • 1.0.0                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org