strip-bom-buffer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,6 +10,7 @@ /*! | ||
var isUTF8 = require('is-utf8'); | ||
var isBuffer = require('is-buffer'); | ||
module.exports = function(buf) { | ||
if (isBuffer(buf) && String(buf.slice(0, 3)) === '\ufeff') { | ||
if (isBuffer(buf) && isUTF8(buf) && String(buf.slice(0, 3)) === '\ufeff') { | ||
return buf.slice(3); | ||
@@ -16,0 +17,0 @@ } |
{ | ||
"name": "strip-bom-buffer", | ||
"description": "Strip a byte order mark (BOM) from a buffer.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/jonschlinkert/strip-bom-buffer", | ||
@@ -23,3 +23,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"is-buffer": "^1.1.5" | ||
"is-buffer": "^1.1.5", | ||
"is-utf8": "^0.2.1" | ||
}, | ||
@@ -26,0 +27,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5813
15
2
1
1
+ Addedis-utf8@^0.2.1
+ Addedis-utf8@0.2.1(transitive)