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

@exodus/simple-retry

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/simple-retry - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"private": false,
"name": "@exodus/simple-retry",
"version": "0.0.5",
"version": "0.0.6",
"description": "Simple Retry",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -1,8 +0,3 @@

# Simple Retry
# Simple Retry [![Build Status](https://travis-ci.com/ExodusMovement/simple-retry.svg?token=4LdsYhfLJBfrCJSUBSTg&branch=master)](https://travis-ci.com/ExodusMovement/simple-retry)
## Setup CI
1. To install Travis CI into the repository: [link](https://github.com/apps/travis-ci/installations/new/permissions?suggested_target_id=16415174)
2. Choose: Only Select Repositories
## Getting Started

@@ -14,2 +9,27 @@

## Usage
```js
import { retry } from '@exodus/simple-retry'
const broadcastTxWithRetry = retry(broadcastFunction, { delayTimesMs: ['10s'] })
const result = await broadcastTxWithRetry(plainTx)
```
It is possible to trap specific errors and mark them as final when retrying is not needed, like:
```js
const broadcastTxWithRetry = retry(
async (plainTx) => {
try {
return await broadcastFunction(plainTx)
} catch (e) {
if (/specific-final-error/i.test(e.message)) e.finalError = true
throw e
}
},
{ delayTimesMs: ['10s'] }
)
```
## Tests

@@ -16,0 +36,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