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

CBuffer

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

CBuffer - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

8

cbuffer.js

@@ -7,2 +7,3 @@ (function(global) {

if (!(this instanceof CBuffer)) {
// multiple conditions need to be checked to properly emulate Array
if (arguments.length > 1 || typeof arguments[0] !== 'number') {

@@ -14,2 +15,4 @@ return CBuffer.apply(new CBuffer(), arguments);

}
// if no arguments, then nothing needs to be set
if (arguments.length === 0) return this;
// this is the same in either scenario

@@ -19,3 +22,3 @@ this.size = this.start = 0;

this.overflow = false;
// build CBuffer based on passed arguments
// emulate Array based on passed arguments
if (arguments.length > 1 || typeof arguments[0] !== 'number') {

@@ -29,2 +32,3 @@ this.data = new Array(arguments.length);

}
// need to `return this` so `return CBuffer.apply` works
return this;

@@ -105,3 +109,3 @@ }

var item;
// check if there are any items in CBuff
// check if there are any items in CBuffer
if (this.size === 0) return;

@@ -108,0 +112,0 @@ // store first item for return

{
"name" : "CBuffer",
"version" : "0.1.2",
"version" : "0.1.3",
"description" : "Circular Buffer JavaScript implementation",

@@ -5,0 +5,0 @@ "homepage" : "https://github.com/trevnorris/cbuffer",

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