strip-bom
Advanced tools
Comparing version 0.3.0 to 0.3.1
12
index.js
@@ -18,14 +18,8 @@ 'use strict'; | ||
stripBom.stream = function () { | ||
var through = require('through2'); | ||
var first = true; | ||
var firstChunk = require('first-chunk-stream'); | ||
return through(function (chunk, enc, cb) { | ||
if (first) { | ||
first = false; | ||
chunk = stripBom(chunk); | ||
} | ||
this.push(chunk); | ||
return firstChunk({minSize: 3}, function (chunk, enc, cb) { | ||
this.push(stripBom(chunk)); | ||
cb(); | ||
}); | ||
}; |
{ | ||
"name": "strip-bom", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Strip UTF-8 byte order mark (BOM) from a string/buffer/stream", | ||
@@ -45,4 +45,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"is-utf8": "^0.2.0", | ||
"through2": "^0.4.1" | ||
"first-chunk-stream": "^0.1.0", | ||
"is-utf8": "^0.2.0" | ||
}, | ||
@@ -49,0 +49,0 @@ "devDependencies": { |
3432
52
+ Addedfirst-chunk-stream@^0.1.0
+ Addedfirst-chunk-stream@0.1.0(transitive)
- Removedthrough2@^0.4.1
- Removedcore-util-is@1.0.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedobject-keys@0.4.0(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedthrough2@0.4.2(transitive)
- Removedxtend@2.1.2(transitive)