strip-bom
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

strip-bom

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.

Install

$ npm install strip-bom

Usage

import stripBom from 'strip-bom';

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

Related


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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.0.0104,057latest

Version History

VersionDownloads (Last 7 Days)Published
5.0.0104,057
4.0.024,117,676
3.0.044,273,322
2.0.09,279,635
1.0.0337,605
0.3.152,735
0.3.03
0.2.13
0.2.03
0.1.03

Package Sidebar

Install

npm i strip-bom

Weekly Downloads

78,165,042

Version

5.0.0

License

MIT

Unpacked Size

3.63 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus