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

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 5.0.0
    64,448
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 5.0.0
    64,448
  • 4.0.0
    21,221,966
  • 3.0.0
    31,378,257
  • 2.0.0
    6,954,721
  • 1.0.0
    225,185
  • 0.3.1
    29,424
  • 0.3.0
    7
  • 0.2.1
    7
  • 0.2.0
    7
  • 0.1.0
    7

Package Sidebar

Install

npm i strip-bom

Weekly Downloads

59,874,029

Version

5.0.0

License

MIT

Unpacked Size

3.63 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus