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

volos-quota-common

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

volos-quota-common - npm Package Compare versions

Comparing version 0.11.7 to 0.11.8

13

lib/memory_buffer.js

@@ -45,2 +45,6 @@ /****************************************************************************

function MemoryBuffer(spi, options) {
if ( options.debug && typeof options.debug === "function") {
debug = options.debug;
}
debug('Creating MemoryBuffer, timeInterval: %d, bufferTimeout: %d', options.timeInterval, options.bufferTimeout);
this.spi = spi;

@@ -89,2 +93,3 @@ this.options = options;

this.buckets[options.identifier] = bucket;
debug('current buckets:', Object.keys(this.buckets));
}

@@ -109,2 +114,3 @@ bucket.apply(now, options, cb);

if (now > b.expires) {
debug('Bucket: %s expired at: %s in bucketTimer, deleting now.',b.options.identifier,new Date(b.expires).toISOString());
delete self.buckets.b;

@@ -162,2 +168,3 @@ }

if (time > this.expires) {
debug('Bucket expired at: %s',new Date(this.expires).toISOString());
this.reset(now); // Quota bucket has expired. The timer also runs but only periodically

@@ -171,2 +178,3 @@ }

var count = this.count + this.remoteCount;
debug('Bucket:%s applying check,count: %d, allow: %d',this.options.identifier, count, allow);
if (!this.expiryTime) { this.calculateExpiration(); }

@@ -226,5 +234,8 @@ var result = {

if (!self.expires) { self.calculateExpiration(); }
debug('Bucket state after flushing: %j ', {
remoteCount: self.remoteCount, count: self.count,
expires: new Date(self.expires).toISOString()
});
if (cb) { cb(); }
});
};

4

lib/quota-connect.js

@@ -33,3 +33,5 @@ /****************************************************************************

}
if ( quota.options.debug && typeof quota.options.debug === "function") {
debug = quota.options.debug;
}
this.quota = quota;

@@ -36,0 +38,0 @@ this.options = options || {};

{
"name": "volos-quota-common",
"version": "0.11.6",
"version": "0.11.8",
"lockfileVersion": 1,

@@ -5,0 +5,0 @@ "requires": true,

{
"name": "volos-quota-common",
"version": "0.11.7",
"version": "0.11.8",
"main": "lib/quota.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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