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

levee

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levee - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

lib/breaker.js

@@ -40,3 +40,3 @@ 'use strict';

this.on('close', function () {
function reset() {
clearTimeout(timer);

@@ -49,4 +49,6 @@ this._pendingClose = false;

});
});
}
this.on('half_open', reset);
this.on('close', reset);
this.close();

@@ -53,0 +55,0 @@ };

{
"name": "levee",
"version": "1.0.1",
"version": "1.0.2",
"description": "A circuitbreaker implementation for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -154,16 +154,33 @@ Levee

A simple data aggregation object.
#### Methods
##### `increment(name)`
Increment a named counter.
- `name` - the label of the counter to increment.
##### `decrement(name)`
Decrement a named counter.
- `name` - the label of the counter to decrement.
##### `sample(name, value)`
Take a sample of a given value.
- `name` - the label of the sample being recorded.
- `value` - the sample value being recorded.
##### `snapshot()`
Get the current state of the current Stats instance. Returns an object with the following properties:
- `counts` - A map of names to current count values.
- `samples` - A map of names to current sample averages and counts, in the form of: `{ average: 0, count, 0 }`
##### `reset()`
Resets all counts and samples.
##### `resetCounts([name])`
Reset counts for the provided name. If no name is provided, resets all counts.
- `name` - the label of the count to reset.
##### `resetSamples([name])`
##### `resetSamples([name])`
Reset samples for the provided name. If no name is provided, resets all samples.
- `name` - the label of the sample to reset.
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