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 - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

11

index.js
'use strict';
var firstChunk = require('first-chunk-stream');
var stripBom = require('strip-bom');
const firstChunk = require('first-chunk-stream');
const stripBomBuf = require('strip-bom-buf');
module.exports = function () {
return firstChunk({chunkLength: 3}, function (err, chunk, enc, cb) {
module.exports = () =>
firstChunk({chunkLength: 3}, (err, chunk, enc, cb) => {
if (err) {

@@ -12,4 +12,3 @@ cb(err);

cb(null, stripBom(chunk));
cb(null, stripBomBuf(chunk));
});
};
{
"name": "strip-bom-stream",
"version": "2.0.0",
"version": "3.0.0",
"description": "Strip UTF-8 byte order mark (BOM) from a stream",

@@ -13,6 +13,6 @@ "license": "MIT",

"engines": {
"node": ">=0.10.0"
"node": ">=4"
},
"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -39,8 +39,9 @@ "files": [

"first-chunk-stream": "^2.0.0",
"strip-bom": "^2.0.0"
"strip-bom-buf": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4",
"concat-stream": "^1.4.5"
"ava": "*",
"get-stream": "^3.0.0",
"xo": "*"
}
}
# strip-bom-stream [![Build Status](https://travis-ci.org/sindresorhus/strip-bom-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom-stream)
> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a stream
> Strip UTF-8 [byte order mark](https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a stream

@@ -20,4 +20,4 @@ From Wikipedia:

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

@@ -29,3 +29,3 @@ fs.createReadStream('unicorn.txt')

It's a [Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform).
It's a [Transform stream](https://nodejs.org/api/stream.html#stream_class_stream_transform).

@@ -35,4 +35,4 @@

- [strip-bom](https://github.com/sindresorhus/strip-bom) - Strip UTF-8 byte order mark (BOM) from a string/buffer
- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
- [strip-bom](https://github.com/sindresorhus/strip-bom) - String version of this module
- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module

@@ -42,2 +42,2 @@

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)
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