🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

strip-bom-stream

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-bom-stream

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

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
2M
3.15%
Maintainers
1
Weekly downloads
 
Created
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

bom

FAQs

Package last updated on 15 Aug 2021

Did you know?

Socket

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