Skip to content

About

Remove a BOM at the start of the stream.

Resources

Security policy

Stars

7 stars

Watchers

2 watching

Forks

Repository files navigation

remove-bom-stream

NPM version Downloads Build Status Coveralls Status

Remove a BOM at the start of the stream.

Usage

var fs = require("fs");
var removeBOM = require("remove-bom-stream");

fs.createReadStream("utf8-file-with-bom.txt")
  .pipe(removeBOM("utf-8"))
  .pipe(fs.createWriteStream("utf8-file-without-bom.txt"));

API

removeBOM(encoding)

Returns a Duplex stream that will remove a BOM if the argument encoding is 'utf-8'/'utf-16le'/'utf-16be' and the given data contains a corresponding BOM at the beginning.

Strict No LLM / No AI Policy

No LLMs for issues.

No LLMs for patches / pull requests.

No LLMs for comments on the bug tracker, including translation.

English is encouraged, but not required. You are welcome to post in your native language and rely on others to have their own translation tools of choice to interpret your words.

License

MIT

About

Remove a BOM at the start of the stream.

Resources

Security policy

Stars

7 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages