Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strip-bom-buffer

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-bom-buffer - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

index.js

@@ -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": {

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