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

cbuffer-resizable

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbuffer-resizable - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

14

index.js

@@ -19,2 +19,3 @@ /**

CBuffer.prototype.constructor.apply(this, Array.prototype.slice.call(arguments));
this._initialLength = this.length;
this._resizeFactor = 2; // default resize factor is 2

@@ -67,2 +68,15 @@ };

CBufferR.prototype.pop = function(){
var popped = CBuffer.prototype.pop.call(this);
if(this.size << 1 > this._initialLength) {
// shrink array if too big
if (this.size < this.length / (this._resizeFactor * this._resizeFactor)) {
this.resize(this.size << 1);
}
}
return popped;
};
CBufferR.prototype.swap = function(a, b){

@@ -69,0 +83,0 @@ var tmp = this.data[a];

2

package.json
{
"author" : "Roberto Sales <robertosalesc@dcc.ufba.br>",
"name": "cbuffer-resizable",
"version": "0.0.2",
"version": "0.0.3",
"description": "resizable circular buffer based on CBuffer package",

@@ -6,0 +6,0 @@ "keywords": ["circular buffer", "resizable", "CBuffer", "resize"],

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