Socket
Socket
Sign inDemoInstall

leaky-bucket

Package Overview
Dependencies
0
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.1 to 4.1.2

2

package.json
{
"name": "leaky-bucket",
"description": "A fast and efficient leaky bucket implementation",
"version": "4.1.1",
"version": "4.1.2",
"homepage": "https://github.com/linaGirl/leaky-bucket",

@@ -6,0 +6,0 @@ "author": "Lina van der Weg <lina@vanderweg.ch> (http://vanderweg.ch/)",

@@ -21,8 +21,7 @@ # leaky-bucket

- works now in modern browsers too (removed node.js dependencies)
- added a debug flag to the constructo
- added a debug flag to the constructor
- added idleTimeout event and constructor flag
- added the initalCapacity option to the constructor
- added the canExecuteNow method
- added the getCapacity method
- added the getCurrentCapacity method
- added the getCapacity() method
- added the getCurrentCapacity() method

@@ -127,3 +126,3 @@

### pause(seconds)
### bucket.pause(seconds)

@@ -140,3 +139,3 @@ The pause method can be use to pause the bucket for n seconds. Same as the throttle call but does not throw errors when the bucket is over its capacity.

### pauseByCost(cost)
### bucket.pauseByCost(cost)

@@ -152,3 +151,3 @@ The pause method can be use to pause the bucket for a specific cost. Same as the throttle call but does not throw errors when the bucket is over its capacity.

### pay(cost)
### bucket.pay(cost)

@@ -164,3 +163,3 @@ Removes the defined cost from the bucket without taking any action. Reduces the current capacity.

### end()
### bucket.end()

@@ -175,3 +174,3 @@ Shuts down the bucket, clears all timers. Removes all pending items wihtout executing them. The bucket cannot be reused thereafter!

### getCapacity()
### bucket.getCapacity()

@@ -186,3 +185,3 @@ Returns the total capacity of the bucket.

### getCurrentCapacity()
### bucket.getCurrentCapacity()

@@ -196,3 +195,3 @@ Returns the current capacity of the bucket.

### setTimeout(seconds)
### bucket.setTimeout(seconds)

@@ -206,3 +205,3 @@ Sets the amount of seconds the bucket queue items before it starts to reject them. Same as the timeout option in the constructor

### setInterval(seconds)
### bucket.setInterval(seconds)

@@ -216,3 +215,3 @@ Sets the interval it takes to refill the bucket completely. Same as the interval option in the constructor

### setCapacity(capacity)
### bucket.setCapacity(capacity)

@@ -228,3 +227,3 @@ Sets the capacity of the bucket. Same as the capacity option in the constructor

### event 'idleTimeout'
### Event bucket.on('idleTimeout')

@@ -250,3 +249,3 @@ This event is emitted, if the bucket is at full capacity and idle for N milliseconds

### event 'idle'
### Event bucket.on('idle')

@@ -253,0 +252,0 @@ This event is emitted, when the bucket is idle, thus no items are waiting to be executed.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc