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

disyuntor

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disyuntor - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

1

index.js

@@ -8,3 +8,2 @@ const ms = require('ms');

cooldown: '15s',
maxCooldown: '60s',
monitor: () => {}

@@ -11,0 +10,0 @@ };

2

package.json
{
"name": "disyuntor",
"description": "A circuit-breaker implementation with exponential backoff.",
"version": "1.0.1",
"version": "1.0.2",
"author": "José F. Romaniello <jfromaniello@gmail.com> (http://joseoncode.com)",

@@ -6,0 +6,0 @@ "repository": {

@@ -29,3 +29,3 @@ A [circuit-breaker](http://martinfowler.com/bliki/CircuitBreaker.html) implementation for node.js with exponential backoff.

const dnsSafeLookup = disyuntor(dns.lookup, {
//Maximum time that the underlying function can take before is considered faulty.
//Timeout for the protected function.
timeout: '2s',

@@ -37,13 +37,13 @@

//The minimum time the circuit will be open before doing another attempt.
//The minimum time the circuit remains open before doing another attempt.
cooldown: '15s',
//The maximum amount of time the circuit will be open before doing a new attempt.
//The maximum amount of time the circuit remains open before doing a new attempt.
maxCooldown: '60s',
//this is used in error messages.
//This is used in error messages.
name: 'dns.lookup',
//optionally log errors
monitor: (err) => logger.panic({ err }, 'Error on dns.lookup')
monitor: (details) => logger.panic({ err: details.err, args: details.args }, 'Error on dns.lookup')
});

@@ -50,0 +50,0 @@ ```

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