Vinícius Ernani de Carvalho 6c4544a079 Create the backend 5 vuotta sitten
..
index.js 6c4544a079 Create the backend 5 vuotta sitten
license 6c4544a079 Create the backend 5 vuotta sitten
package.json 6c4544a079 Create the backend 5 vuotta sitten
readme.md 6c4544a079 Create the backend 5 vuotta sitten

readme.md

is-retry-allowed Build Status

Is retry allowed for Error?

Install

$ npm install --save is-retry-allowed

Usage

const isRetryAllowed = require('is-retry-allowed');

isRetryAllowed({code: 'ETIMEDOUT'});
//=> true

isRetryAllowed({code: 'ENOTFOUND'});
//=> false

isRetryAllowed({});
//=> true

API

isRetryAllowed(error)

error

Type: object

Object with code property, which will be used to determine retry.

License

MIT © Vsevolod Strukchinsky