Vinícius Ernani de Carvalho 6c4544a079 Create the backend 5 anos atrás
..
index.js 6c4544a079 Create the backend 5 anos atrás
license 6c4544a079 Create the backend 5 anos atrás
package.json 6c4544a079 Create the backend 5 anos atrás
readme.md 6c4544a079 Create the backend 5 anos atrás

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