Vinícius Ernani de Carvalho 6c4544a079 Create the backend 5 سال پیش
..
index.js 6c4544a079 Create the backend 5 سال پیش
license 6c4544a079 Create the backend 5 سال پیش
package.json 6c4544a079 Create the backend 5 سال پیش
readme.md 6c4544a079 Create the backend 5 سال پیش

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