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

promise-retry

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-retry - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

2

index.js

@@ -34,3 +34,3 @@ 'use strict';

throw errcode('Retrying', 'EPROMISERETRY', { retried: err });
throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });
}, number);

@@ -37,0 +37,0 @@ })

{
"name": "promise-retry",
"version": "1.1.1",
"version": "2.0.0",
"description": "Retries a function that returns a promise, leveraging the power of the retry module.",

@@ -27,8 +27,8 @@ "main": "index.js",

"expect.js": "^0.3.1",
"mocha": "^3.0.0",
"sleep-promise": "^2.0.0"
"mocha": "^8.0.1",
"sleep-promise": "^8.0.1"
},
"dependencies": {
"err-code": "^1.0.0",
"retry": "^0.10.0"
"err-code": "^2.0.2",
"retry": "^0.12.0"
},

@@ -35,0 +35,0 @@ "engines": {

# node-promise-retry
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]

@@ -12,4 +12,6 @@ [npm-url]:https://npmjs.org/package/promise-retry

[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-promise-retry.svg
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-promise-retry#info=devDependencies
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-promise-retry?type=dev
[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-promise-retry.svg
[greenkeeper-image]:https://badges.greenkeeper.io/IndigoUnited/node-promise-retry.svg
[greenkeeper-url]:https://greenkeeper.io/

@@ -43,4 +45,4 @@ Retries a function that returns a promise, leveraging the power of the [retry](https://github.com/tim-kos/node-retry) module to the promises world.

The `fn` function will receive a `retry` function as its first argument that should be called with an error whenever you want to retry `fn`. The `retry` function will always throw an error.
If there's retries left, it will throw a special `retry` error that will be handled internally to call `fn` again.
If there's no retries left, it will throw the actual error passed to it.
If there are retries left, it will throw a special `retry` error that will be handled internally to call `fn` again.
If there are no retries left, it will throw the actual error passed to it.

@@ -47,0 +49,0 @@ If you prefer, you can pass the options first using the alternative function signature `promiseRetry([options], fn)`.

Sorry, the diff of this file is not supported yet

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