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

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'

Security

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Related

License

MIT © Sindre Sorhus

Current Tags

  • 5.0.0                                ...           latest (4 years ago)

5 Versions

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

Copyright 2013 - present © cnpmjs.org