New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bufferhelper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bufferhelper - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

.npmignore

10

lib/bufferhelper.js
var BufferHelper = function () {
this.buffers = [];
this.size = 0;
Object.defineProperty(this, 'length', {
get: function () {
return this.size;
}
});
};

@@ -7,2 +13,3 @@

this.buffers.push(buffer);
this.size += buffer.length;
return this;

@@ -13,2 +20,3 @@ };

this.buffers = [];
this.size = 0;
return this;

@@ -18,3 +26,3 @@ };

BufferHelper.prototype.toBuffer = function () {
return Buffer.concat(this.buffers);
return Buffer.concat(this.buffers, this.size);
};

@@ -21,0 +29,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Concat buffer correctly.",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/JacksonTian/bufferhelper",

@@ -8,0 +8,0 @@ "repository": {

@@ -15,2 +15,3 @@ var BufferHelper = require('../');

bh.concat(buffer);
bh.length.should.be.equal(6);
bh.toBuffer().should.have.length(buffer.length);

@@ -17,0 +18,0 @@ bh.buffers.should.have.length(1);

Sorry, the diff of this file is not supported yet

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