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

strip-bom-buf

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

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-buf

Usage

import fs from 'node:fs';
import stripBomBuffer from 'strip-bom-buf';

stripBomBuffer(fs.readFileSync('unicorn.txt'));
//=> 'unicorn'

Related

Current Tags

  • 4.0.0                                ...           latest (a year ago)

5 Versions

  • 4.0.0                                ...           a year ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (4)

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