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

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.

Current Tags

  • 5.0.0                                ...           latest (4 years ago)

10 Versions

  • 5.0.0                                ...           4 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.0                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.0.0                                ...           10 years ago
  • 0.3.1                                ...           10 years ago
  • 0.3.0                                ...           11 years ago
  • 0.2.1                                ...           11 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.0                                ...           11 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE