Socket
Socket
Sign inDemoInstall

is-retry-allowed

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-retry-allowed - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

6

index.d.ts

@@ -8,3 +8,3 @@ /**

```
import isRetryAllowed = require('is-retry-allowed');
import isRetryAllowed from 'is-retry-allowed';

@@ -21,4 +21,2 @@ isRetryAllowed({code: 'ETIMEDOUT'});

*/
declare function isRetryAllowed(error?: Error | Record<string, unknown>): boolean;
export = isRetryAllowed;
export default function isRetryAllowed(error?: Error | Record<string, unknown>): boolean;

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

'use strict';
const denyList = new Set([

@@ -39,2 +37,4 @@ 'ENOTFOUND',

// TODO: Use `error?.code` when targeting Node.js 14
module.exports = error => !denyList.has(error && error.code);
export default function isRetryAllowed(error) {
return !denyList.has(error && error.code);
}
{
"name": "is-retry-allowed",
"version": "2.2.0",
"version": "3.0.0",
"description": "Check whether a request can be retried based on the `error.code`",
"license": "MIT",
"repository": "sindresorhus/is-retry-allowed",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
},
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=10"
"node": ">=12"
},

@@ -36,6 +36,6 @@ "scripts": {

"devDependencies": {
"ava": "^3.14.0",
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.36.1"
"xo": "^0.38.2"
}
}

@@ -8,3 +8,3 @@ # is-retry-allowed

```
$ npm install --save is-retry-allowed
$ npm install is-retry-allowed
```

@@ -15,3 +15,3 @@

```js
const isRetryAllowed = require('is-retry-allowed');
import isRetryAllowed from 'is-retry-allowed';

@@ -18,0 +18,0 @@ isRetryAllowed({code: 'ETIMEDOUT'});

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