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

re

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

re - npm Package Compare versions

Comparing version 0.0.1-2 to 0.0.1-3

2

main.js

@@ -23,3 +23,3 @@ var re = Re(options);

function Re(options){
exports.Re = function Re(options){
if(!(this instanceof Re)) return Re(options);

@@ -26,0 +26,0 @@

{
"name": "re",
"version": "0.0.1-2",
"version": "0.0.1-3",
"description": "Do it again, after a bit.",

@@ -5,0 +5,0 @@ "tags": ["utility", "data", "util", "utility"],

@@ -5,3 +5,3 @@ # Re

retry strategies, including: constant, exponential backoff and linear backoff.
In the style of the async library.
Functions are styled after the async library.

@@ -38,10 +38,13 @@

This first function should take 3 arguments like this:
This first function passed to `re.try` should take 3 arguments like this:
function operation(retryCount, fail, callback)
The `retryCount` argument is the number if the current retry, it'll be zero the first time
and get bigger every time. The `fail` argument is a function to call if you
encounter a fail condition in your function. This let's us know we need to try again.
The `retryCount` argument is the number if the current retry. It'll be zero the first time
and get bigger every time.
The `fail` argument is a function to call if you
encounter a fail condition in your operation. This let's us know we need to try again.
You can pass an `err` argument to the `fail` function.
The `callback` argument is the callback function you passed into `re.try`. It should be

@@ -48,0 +51,0 @@ a function that takes an `err` parameter as it's first argument. The rest of the arguments

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