Strip UTF-8 byte order mark (BOM) from a string
Clone or download
Latest commit 9fb56e0 Sep 29, 2018
Permalink
Failed to load latest commit information.
test Require Node.js 6 Sep 29, 2018
.editorconfig Require Node.js 6 Sep 29, 2018
.gitattributes Require Node.js 6 Sep 29, 2018
.gitignore Require Node.js 6 Sep 29, 2018
.npmrc Require Node.js 6 Sep 29, 2018
.travis.yml Require Node.js 6 Sep 29, 2018
index.js Require Node.js 6 Sep 29, 2018
license Require Node.js 6 Sep 29, 2018
package.json Require Node.js 6 Sep 29, 2018
readme.md Require Node.js 6 Sep 29, 2018

readme.md

strip-bom Build Status

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

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.


Get professional support for 'strip-bom' with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Install

$ npm install strip-bom

Usage

const stripBom = require('strip-bom');

stripBom('\uFEFFunicorn');
//=> 'unicorn'

Related

License

MIT © Sindre Sorhus