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.0.9 to 0.0.10

test/index.html

18

cbuffer.js

@@ -86,2 +86,18 @@ (function( global ) {

},
// rotate buffer to the left by cntr, or by 1
rotateLeft : function( cntr ) {
if ( !cntr ) cntr = 1;
while ( --cntr >= 0 ) {
this.push( this.shift());
}
return this;
},
// rotate buffer to the right by cntr, or by 1
rotateRight : function( cntr ) {
if ( !cntr ) cntr = 1;
while ( --cntr >= 0 ) {
this.unshift( this.pop());
}
return this;
},
// remove and return first item

@@ -243,5 +259,5 @@ shift : function() {

if ( module && module.exports ) module.exports = CBuffer;
if ( typeof module === 'object' && module.exports ) module.exports = CBuffer;
else global.CBuffer = CBuffer;
}( this ));

2

package.json
{
"name" : "CBuffer",
"version" : "0.0.9",
"version" : "0.0.10",
"description" : "Circular Buffer JavaScript implementation",

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

@@ -24,2 +24,4 @@ ## JavaScript [Circular Buffer](http://en.wikipedia.org/wiki/Circular_buffer) Utility

* reverse()
* rotateLeft(x)
* rotateRight(x)
* shift()

@@ -26,0 +28,0 @@ * sort()

@@ -5,3 +5,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -8,0 +8,0 @@ suite.addBatch({

@@ -6,3 +6,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -9,0 +9,0 @@ suite.addBatch({

@@ -1,1 +0,1 @@

CBuffer = require( '../cbuffer.js' );
CBuffer = require( '../cbuffer' );

@@ -5,3 +5,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -8,0 +8,0 @@ suite.addBatch({

@@ -5,3 +5,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -8,0 +8,0 @@ suite.addBatch({

@@ -5,3 +5,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -8,0 +8,0 @@ suite.addBatch({

@@ -5,3 +5,3 @@ var vows = require( 'vows' ),

require( '../env.js' );
require( '../env' );

@@ -8,0 +8,0 @@ suite.addBatch({

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