Socket
Socket
Sign inDemoInstall

strip-bom-stream

Package Overview
Dependencies
3
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    strip-bom-stream

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


Version published
Weekly downloads
1.4M
increased by8.55%
Maintainers
1
Install size
25.5 kB
Created
Weekly downloads
 

Readme

Source

strip-bom-stream

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

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

Usage

import fs from 'node:fs';
import stripBomStream from 'strip-bom-stream';

fs.createReadStream('unicorn.txt')
	.pipe(stripBomStream())
	.pipe(fs.createWriteStream('unicorn.txt'));

It's a Transform stream.

  • strip-bom - String version of this module
  • strip-bom-buf - Buffer version of this module

Keywords

FAQs

Last updated on 15 Aug 2021

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