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

ts-retry

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-retry - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "ts-retry",
"version": "1.0.2",
"version": "1.0.3",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/franckLdx/ts-retry.git",

# ts-retry
A little retry tool in javascript/typescript for node.
## How to:
* to retry something: <code>await retry(()=> {/* do something */}, {delay:100,maxTry:5})</code>
* to retry something async : <code>await retryAsync(async ()=> {/* do something */}, {delay:100,maxTry:5})</code>
Above examples make up to 5 attempts, waiting 100ms between each try.
## API

@@ -10,2 +16,2 @@ * retry(fn, retryOptions): call repeteadly fn until fn does not throw and exception. Stop after retryOptions.maxTry count. Between each call wait retryOptions.delay milliseconds.

- maxTry maximum calls to fn.
- delay: delay between each call (in milliseconds).
- delay: delay between each call (in milliseconds).
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