strip-bom-stream
Advanced tools
Comparing version 1.0.0 to 2.0.0
10
index.js
@@ -6,6 +6,10 @@ 'use strict'; | ||
module.exports = function () { | ||
return firstChunk({minSize: 3}, function (chunk, enc, cb) { | ||
this.push(stripBom(chunk)); | ||
cb(); | ||
return firstChunk({chunkLength: 3}, function (err, chunk, enc, cb) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
cb(null, stripBom(chunk)); | ||
}); | ||
}; |
{ | ||
"name": "strip-bom-stream", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Strip UTF-8 byte order mark (BOM) from a stream", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"first-chunk-stream": "^1.0.0", | ||
"first-chunk-stream": "^2.0.0", | ||
"strip-bom": "^2.0.0" | ||
@@ -40,0 +40,0 @@ }, |
@@ -33,3 +33,3 @@ # 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-bom](https://github.com/sindresorhus/strip-bom-stream) - Strip UTF-8 byte order mark (BOM) from a string/buffer | ||
- [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 | ||
@@ -36,0 +36,0 @@ |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3229
12
0
+ Addedcore-util-is@1.0.3(transitive)
+ Addedfirst-chunk-stream@2.0.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedfirst-chunk-stream@1.0.0(transitive)
Updatedfirst-chunk-stream@^2.0.0