{"name":"is-retry-allowed","version":"2.0.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"},"keywords":["retry","retries","allowed","check","http","https","request","fetch"],"devDependencies":{"ava":"^2.3.0","xo":"^0.36.1"},"gitHead":"3aac9f3c40db932200c72cf82a9ceb703c03c472","bugs":{"url":"https://github.com/sindresorhus/is-retry-allowed/issues"},"homepage":"https://github.com/sindresorhus/is-retry-allowed#readme","_id":"is-retry-allowed@2.0.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-tIYU765Xal9/iqLuMJHgPYx2P9QJrAEIuDU2UkoaKrF55frZL+SH9BDUFVEMnmPkV38JtnvaxJUG5gNNUvgV4Q==","shasum":"86c81a5cc7438da7de82c7bf00e711079646a98b","tarball":"http://registry-npm.ywwl.com/is-retry-allowed/download/is-retry-allowed-2.0.0.tgz","fileCount":4,"unpackedSize":3853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5V50CRA9TVsSAnZWagAAZTwQAJ4NQZZnqLeIBtssFIqN\nvDRPcH7x2SEwp2uxVH6ghSjSNlVo3mRw75msSPnsKPv2VdvP1ybMwQ+aM8D3\npkM3bOjTiTg2NGQyQE6XKUDsr7QbTmpDtyCCo1PASmKfvtYmtWZoAkEiDZkc\nYuNMaVRhmYCW2rSZhPsw7M7hU7rKEMrmcnnWAIgwtYiZK1D/xILgwwDPLsBJ\nVHtp5vxzAS2yH92G2MWeZVmPJfac722vbjGOxz/OYqp8aiMZJZ5hIrUXpXsV\nAlEPk7mZ4CxiMrQhme7N4SXmRgKwU5K7JYrTH9HdS9XXQxgWIj0tqejhBE5M\nYcQn25fNGafZfFvSVJNbulG1eq4oXpbbNL0J5NZj6YURvChiqAIG5JfplCsI\nhxvfQ9nTFkmpo+sHmMvsa898s6xp4h/Ldn60vm0gVGcStTJzHwQRAfU/hDNq\nMCDplmiXjlrIjUxbyeszmmzoWBS1WkVPw44li7hxilazMIR19yhopD04a1Ja\nUIVco5nDu+1vg1Z7jVMBo39eiuIN8NtgZtbC3UXy0NVH4pF0gOKJ5yx4xJOo\nWmC3wBQauJbd4vkYFWGoxYeAMxhkiJUreeWXZFMQi7+4uU96RjRgDV0Gt1nE\nxsENRfSjp+7fYQwYFgbhe6sbTVVZLQEAs7wV4geqrfZAD0Zxxf+N4z1UanW/\nkWCq\r\n=K7EL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD33INSU2H6t3TowO1FUIrhzCdVbMhRz6zm1qm9korPnwIhAI2w9ogec8x2xHeXfO4QDkPCSoFuGTTnAJctylmS23V1"}],"size":2127,"noattachment":false,"key":"/is-retry-allowed/-/is-retry-allowed-2.0.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.0.0_1608867444151_0.4289122639024445"},"_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":1608867444294,"_cnpm_publish_time":1608867444294,"dist-tags":{"latest":"3.0.0"}}