node-fetch-retry
Advanced tools
Comparing version 1.1.1 to 1.1.2
10
index.js
@@ -10,3 +10,3 @@ const fetch = require('node-fetch'); | ||
} catch(e) { | ||
if (opts.callback) { | ||
if (opts && opts.callback) { | ||
opts.callback(retry) | ||
@@ -19,6 +19,6 @@ } | ||
if (opts.pause) { | ||
if (!opts.silent) console.log("pausing.."); | ||
if (opts && opts.pause) { | ||
if (opts && !opts.silent) console.log("pausing.."); | ||
await sleep(opts.pause); | ||
if (!opts.silent) console.log("done pausing..."); | ||
if (opts && !opts.silent) console.log("done pausing..."); | ||
} | ||
@@ -32,2 +32,2 @@ } | ||
return new Promise(resolve => setTimeout(resolve, ms)); | ||
} | ||
} |
{ | ||
"name": "node-fetch-retry", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Retry library for node-fetch", | ||
@@ -26,3 +26,3 @@ "scripts": { | ||
"devDependencies": { | ||
"mocha": "^7.0.0", | ||
"mocha": "^9.0.3", | ||
"should": "^13.2.3" | ||
@@ -29,0 +29,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7854
131