{"name":"is-retry-allowed","version":"2.2.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":{"url":"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":"5d4b13f991941dbda9dae0a9b5b4bc2f8c94b6b2","bugs":{"url":"https://github.com/sindresorhus/is-retry-allowed/issues"},"homepage":"https://github.com/sindresorhus/is-retry-allowed#readme","_id":"is-retry-allowed@2.2.0","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==","shasum":"88f34cbd236e043e71b6932d09b0c65fb7b4d71d","tarball":"http://registry-npm.ywwl.com/is-retry-allowed/download/is-retry-allowed-2.2.0.tgz","fileCount":5,"unpackedSize":4425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6NVCCRA9TVsSAnZWagAAh1sQAJbhcrNiiSUzG9015s7q\nJ1a+N53rCo693kAELMuKmEZuDi1IQ4Sg0Te7QqSNopgPWu9MfxT+O5z876tq\nIzst/+b8dP8veMI1X9q6qpvcKLlwdgJM0uzqheY5Bsf7T5f2FzXRsMSdhKGX\nH07wmWLWroPEsKaukYb22np2ehZIdjy8Rb6cQgZsEZ0O42XCKgCOJe9f+A7h\nH1tTpLsbnrdSGmnPxNJUe9qwtnioOrwa3ytPAr5oSU3oQ4Ex+X1Zn730fw0n\nUyrAwDFaDmtRbXUwVcPtvC1qw8SWz7QUAcd0InSNh6ChYHLfCSweAhaQak/C\nEYDcPe6n1xjqBP7o1Vh2sDctiOptowfpCzQZVk4breAmbUhGFkm/M2etYaw/\nlFChMuTD/CksfC4W9di50x3NN7ugiExa1E+EKTpDXCsmqKv1lpsYvPfcQJqI\nTKZVlEbGehzxyRibfEX0EJ/a+FgEfG6LRJgBmQPHszpmMrkIwkOJmMriCdHo\nEtf+Ov7o+7aCc9530GZZ7YZMPxp2XuEtzR5Ok1BXuPAJ+ThWuk74qoIpEYwm\n+MSAzQvGtQ2Qe7UrXH+LH9j3YQ/1uKlV1795x1vGuJIbZ5TMiFhLEbTzLNEi\npl39iT4t2ZP3jFMowmd8mJXIWdz+PEzE3P3oybmpUjmoaZx03o1zlhdoAPCF\nhxFI\r\n=z/ge\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGx2r99828kDnKyC+ACF2YWvh4Mry0IjZa+4QBsUnpmwIhAL0GCr5p+IXgVDM0nx0OAKzhBb3vm78DUmlbv7G5497z"}],"size":2289,"noattachment":false,"key":"/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"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.2.0_1609094465772_0.6185619465816807"},"_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":1609094465877,"_cnpm_publish_time":1609094465877,"dist-tags":{"latest":"3.0.0"}}