Socket
Socket
Sign inDemoInstall

strip-bom-buf

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    strip-bom-buf

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


Version published
Weekly downloads
739K
decreased by-19.56%
Maintainers
1
Install size
25.0 kB
Created
Weekly downloads
 

Readme

Source

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'
  • strip-bom - String version of this module
  • strip-bom-stream - Stream version of this module

Keywords

FAQs

Last updated on 24 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc