Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is strip-bom-stream?

The strip-bom-stream npm package is used to remove Byte Order Marks (BOM) from streams. BOMs are special markers at the start of text streams that indicate the encoding used. This package is particularly useful when dealing with text streams that may contain BOMs, ensuring that the BOM is stripped out so that the text can be processed correctly.

What are strip-bom-stream's main functionalities?

Remove BOM from a stream

This feature allows you to remove the BOM from a readable stream and pipe the cleaned data into a writable stream. In this example, the BOM is removed from 'file-with-bom.txt' and the result is written to 'file-without-bom.txt'.

const fs = require('fs');
const stripBomStream = require('strip-bom-stream');

fs.createReadStream('file-with-bom.txt')
  .pipe(stripBomStream())
  .pipe(fs.createWriteStream('file-without-bom.txt'));

Other packages similar to strip-bom-stream

Keywords

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc