{"name":"is-retry-allowed","version":"2.1.0","description":"Check whether a request can be retried based on the `error.code`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-retry-allowed.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["retry","retries","allowed","check","http","https","request","fetch"],"devDependencies":{"ava":"^3.14.0","tsd":"^0.14.0","xo":"^0.36.1"},"gitHead":"af8baf12c038ed61ba86dce45e5ac518301d8ea4","bugs":{"url":"https://github.com/sindresorhus/is-retry-allowed/issues"},"homepage":"https://github.com/sindresorhus/is-retry-allowed#readme","_id":"is-retry-allowed@2.1.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-DKPtr0Q04YlRoT3kmt1oYJ/Eq+nCOv+CPive4GG/DZdhEswtnxgnawqBsG29IkkAwE/7w0FrlBiz9309UBuxmw==","shasum":"328843ce5725d7e27b21c3fb2570b7e007eadf96","tarball":"http://registry-npm.ywwl.com/is-retry-allowed/download/is-retry-allowed-2.1.0.tgz","fileCount":5,"unpackedSize":4382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5djLCRA9TVsSAnZWagAA1Z0P/1dpAHs60FApUdox6qia\n/MOJmTiEi0pptHYEx/vhLv7jmPgp08t2Yk8ZzVtVhwJPdBwYJwE/iPFLQW+B\npnGmNrpVi7sIRq+Ix+sId5SR3BViwGVzlZvJKBv9zW1/zMksvcyn5iBrmCBV\nwZuaQF6XC4Kw+2BPHAP/GViaiHA5shYHytMaC2CHV+8FC3GAInMhp7gUlmT3\nGQvQpWwqCZqIiJzcVvgARMY7hBiY3JHAUGqOzGzhyide+6SVIand4GUtfua2\nXRXghv9nndvTgqWtnYyhZdrY7mBMwQziETwbZYXhbrq7qsWVRJ9ldUCsZbmn\ncBg+nXRtz5a+IWzF8hEugutxcB4mEJkcxvpdlD1FT2BqP2N3sxVGMXMMc+Jt\n+lh2a+TDLfLZhfrel8eNerQqld2cYClbRZqmaD6ZP+uxZ+so9j4hV7mSaQn/\nLy94X94qJ8+Na9VptDA3QE7cVqxRHDHvAMf8Y4yhLH7L0D5m9CaJfO1NDPa7\nQfUuxQgLjMPtb80kOlKoM7lUYBomT3iGXL5aeEkzeJ1yrjV/g0RuQV+yt1lf\nNL1HJ1uD1mREfw3ayXvzvlvvTHsFl7LHxQpwPaO6eGdlCBAdQC11RhkuJRY5\nMM/qN789PTV2GVqIx+14u50rIuYl1JEHVclBaofZ0h6SmcyxMDV9U5M0nJDt\niXiY\r\n=VVaG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcX7R2HGUl2VfYGMRAhIizvNokg+rBTHRYs6NPTTCX3AiEA8ZUUYLesOTvJhjXPM3IiW0YXEsWmnuc21R7HhG5R/fY="}],"size":2261,"noattachment":false,"key":"/is-retry-allowed/-/is-retry-allowed-2.1.0.tgz"},"directories":{},"maintainers":[{"name":"floatdrop","email":"floatdrop@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-retry-allowed_2.1.0_1608898762522_0.9631240861254178"},"_hasShrinkwrap":false,"readme":"# is-retry-allowed\n\n> Check whether a request can be retried based on the `error.code`\n\n## Install\n\n```\n$ npm install is-retry-allowed\n```\n\n## Usage\n\n```js\nimport isRetryAllowed from 'is-retry-allowed';\n\nisRetryAllowed({code: 'ETIMEDOUT'});\n//=> true\n\nisRetryAllowed({code: 'ENOTFOUND'});\n//=> false\n\nisRetryAllowed({});\n//=> true\n```\n\n## API\n\n### isRetryAllowed(error)\n\n#### error\n\nType: `Error | object`\n\nThe `.code` property, if it exists, will be used to determine whether retry is allowed.\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-is-retry-allowed?utm_source=npm-is-retry-allowed&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1608898762677,"_cnpm_publish_time":1608898762677,"dist-tags":{"latest":"3.0.0"}}