{"name":"is-retry-allowed","version":"3.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":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["retry","retries","allowed","check","http","https","request","fetch"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"6f5ef8c4b28d9d333f9a796d31ec68377a0c826e","bugs":{"url":"https://github.com/sindresorhus/is-retry-allowed/issues"},"homepage":"https://github.com/sindresorhus/is-retry-allowed#readme","_id":"is-retry-allowed@3.0.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-9xH0xvoggby+u0uGF7cZXdrutWiBiaFG8ZT4YFPXL8NzkyAwX3AKGLeFQLvzDpM430+nDFBZ1LHkie/8ocL06A==","shasum":"ea79389fd350d156823c491bee9c69f485b1445c","tarball":"http://registry-npm.ywwl.com/is-retry-allowed/download/is-retry-allowed-3.0.0.tgz","fileCount":5,"unpackedSize":4444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgepKbCRA9TVsSAnZWagAAYp8P/3LI9UEKLuk4cU+ZQabg\nEsNXRuUtiI+3YgD6FkkFwJNjaiYNffa+528dqgZdtJ+NXw1G/qrZmgtBKZaM\n95FCNH1IibUxlg3kgqvw1QZ0rj1Cvi+ikZmYdXsAJU3GhJjGmsyX1wVW+Cu4\nc/MQRKj43GtQwr2GIzto6I+VKQeY5WnyenExgLIym9vGQC5W9o4RkmjvSCye\nD3DIOa3bSo035SV6dMsP6Zw68RTcqm2d1RoRUxqLiokSEx5g5LGKyHbxn0Eq\nqlenC4Aq+3LQ3cbNzzOn/obe/32bw8sJHPPtu572GhDSfgjMLuPppzZrJdvr\nyqB2NRpaqFwtMAEewuWCWqbze7rkFUaFREMTzbnL0iVXx5f83VT9pA+r3NlC\nZuwXAkC9nqOK9wtbAFsxeZDYLnIUR6sv6sb/OZvM08iyusVqnqTyebI5kelT\nXdgMLQYglbNmtmxRCmhBEu9yNg2G4MqyXxrJMupJL05qAsEyweExZrM9uNnn\n6owbMYapmE7IvZ21vZ0K7iLgtL1O8FJAp5SzTjePi8mCM5lkYpy7mdexhI65\nHiD/DFw8s4X7DL8mX/FiM9xN/DQffboxVwZyVfDLr2KP4YSh7GIDDhFop4nB\njORHd/Y2xLtsBdIbDooQizVmjVU/ovYnHKk8J7wLOD6GP3HDUeGGKYfen076\neMzB\r\n=tLRf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHL2+wvWjN5FCvMCv7+z2whue3q5U3DGM4zRkrEumuBpAiEAyUepX+1yat1nfFBjwwRf30pGiPMYERnMbQnel6me+WY="}],"size":2277,"noattachment":false,"key":"/is-retry-allowed/-/is-retry-allowed-3.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_3.0.0_1618645659487_0.986709493832622"},"_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":1618645659599,"_cnpm_publish_time":1618645659599,"dist-tags":{"latest":"3.0.0"}}