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

cockatiel

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cockatiel - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

2

package.json
{
"name": "cockatiel",
"version": "3.1.1",
"version": "3.1.2",
"description": "A resilience and transient-fault-handling library that allows developers to express policies such as Backoff, Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. Inspired by .NET Polly.",

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

@@ -26,3 +26,3 @@ # Cockatiel

// times with a randomized exponential backoff.
const retry = retry(handleAll, { maxAttempts: 3, backoff: new ExponentialBackoff() });
const retryPolicy = retry(handleAll, { maxAttempts: 3, backoff: new ExponentialBackoff() });

@@ -32,3 +32,3 @@ // Create a circuit breaker that'll stop calling the executed function for 10

// to recover without getting tons of traffic.
const circuitBreaker = circuitBreaker(handleAll, {
const circuitBreakerPolicy = circuitBreaker(handleAll, {
halfOpenAfter: 10 * 1000,

@@ -39,3 +39,3 @@ breaker: new ConsecutiveBreaker(5),

// Combine these! Create a policy that retries 3 times, calling through the circuit breaker
const retryWithBreaker = wrap(retry, circuitBreaker);
const retryWithBreaker = wrap(retryPolicy, circuitBreakerPolicy);

@@ -42,0 +42,0 @@ exports.handleRequest = async (req, res) => {

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