Socket
Socket
Sign inDemoInstall

promise-retry

Package Overview
Dependencies
2
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

15

index.js

@@ -5,3 +5,2 @@ 'use strict';

var retry = require('retry');
var promiseTry = require('promise-try');

@@ -29,5 +28,4 @@ var hasOwn = Object.prototype.hasOwnProperty;

operation.attempt(function (number) {
var promise;
promise = promiseTry(function () {
Promise.resolve()
.then(function () {
return fn(function (err) {

@@ -38,9 +36,6 @@ if (isRetryError(err)) {

throw errcode('Retrying', 'EPROMISERETRY', {
retried: err
});
throw errcode('Retrying', 'EPROMISERETRY', { retried: err });
}, number);
});
promise.then(resolve, function (err) {
})
.then(resolve, function (err) {
if (isRetryError(err)) {

@@ -47,0 +42,0 @@ err = err.retried;

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

@@ -32,3 +32,2 @@ "main": "index.js",

"err-code": "^1.0.0",
"promise-try": "^1.0.1",
"retry": "^0.9.0"

@@ -35,0 +34,0 @@ },

@@ -9,3 +9,3 @@ # node-promise-retry

[travis-url]:https://travis-ci.org/IndigoUnited/node-promise-retry
[travis-image]:http://img.shields.io/travis/IndigoUnited/node-promise-retry.svg
[travis-image]:http://img.shields.io/travis/IndigoUnited/node-promise-retry/master.svg
[david-dm-url]:https://david-dm.org/IndigoUnited/node-promise-retry

@@ -12,0 +12,0 @@ [david-dm-image]:https://img.shields.io/david/IndigoUnited/node-promise-retry.svg

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc