@beyonk/promise-retry

0.1.1 • Public • Published

Beyonk

Promise Retry

js-standard-style CircleCI

Retryable promise utility for the browser

Why

There are a few similar modules out there, mostly abandonware, few with tests.

Usage

Install the module:

npm install --save-dev @beyonk/promise-retry

Use it in your code:

// defaults
const retries = 5
const intervalBetweenRetries = 1000

const myFunction = async function () { ...blah }

retry(
  myFunction,
  retries,
  intervalBetweenRetries
)

Running Tests

npm test

Credits

  • Code adapted from this gist, and corrected.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    60
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    60
  • 0.1.0
    0

Package Sidebar

Install

npm i @beyonk/promise-retry

Weekly Downloads

60

Version

0.1.1

License

MIT

Unpacked Size

4.5 kB

Total Files

6

Last publish

Collaborators

  • leandro.silva
  • alex.dilley
  • antony
  • adampond