{"name":"popsicle-retry","version":"4.0.0","description":"Enable request retry for Popsicle","main":"dist/index.js","scripts":{"prettier":"prettier --write","lint":"tslint \"src/**/*.ts\" --project tsconfig.json","format":"npm run prettier -- README.md \"src/**/*.{js,ts}\"","build":"rimraf dist && tsc","specs":"jest --coverage","test":"npm run -s lint && npm run -s build && npm run -s specs && npm run -s size","prepare":"npm run build","size":"size-limit"},"repository":{"type":"git","url":"git://github.com/serviejs/popsicle-retry.git"},"keywords":["popsicle","retry","fail","5xx","error","http"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"Apache-2.0","bugs":{"url":"https://github.com/serviejs/popsicle-retry/issues"},"homepage":"https://github.com/serviejs/popsicle-retry","size-limit":[{"path":"./dist/index.js","limit":"1 kB"}],"jest":{"roots":["<rootDir>/src/"],"transform":{"\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,json,css,md}":["npm run prettier","git add"]},"publishConfig":{"access":"public"},"peerDependencies":{"servie":"^4.0.0"},"devDependencies":{"@types/jest":"^24.0.13","husky":"^2.4.0","jest":"^24.8.0","lint-staged":"^8.2.0","prettier":"^1.18.2","servie":"^4.0.7","size-limit":"^1.3.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.1"},"gitHead":"f0a8196c8af85af73dbf3e04ec4e3b73a5dee292","_id":"popsicle-retry@4.0.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DLVXWWM/py5mcqBARjISim+kijH4C50zfaoHkBw7QUOrSO7eX9RZzA9j6Opm/aUauQ6Gsa4UfAtYTPf+11+T2A==","shasum":"1b4345555891c788e8cd91fb2e0fe3d1cd601e6b","tarball":"http://registry-npm.ywwl.com/popsicle-retry/download/popsicle-retry-4.0.0.tgz","fileCount":9,"unpackedSize":15115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/YXlCRA9TVsSAnZWagAAKXoP/iGmqYQbA9iu6UXpAm0a\n6JLgvEdksfJ+7nsKBr4K6fIqZeaFCFEdCaop5aiTI0WUO6/g9PtcOIzswYKA\n0p4fsR1BcA7sIC56jqvJ6OENaWDZumvoO5otY8D199e4oi2blOhuhHOahXAl\nHo2XfJ0Jyuq7v6DKfjSUFirHSh9a9nH9RHWOMNLU4NM+CeBHBokvmBmbQYVc\nS4CYIVKQAe7dPn4o6b7SDcwYi2JGbuV1T18BZQhCwd4LaX5uw9pr8XvKVDjm\n8jAONwXj1KpSwRWGhU062K6huwKylgEHdlH/YhaJDru4Og/X15xQQZwXz+HC\nFwHKvlGzJU0djCv9BKkwtowGvVxuLJdJMaRpBQKSWvGQDw4WlOuRlGqrXQss\nfadrI2wqechXQ8t0D7crBey2N6b/by/OcJWf3iS+soV8Sf1AGD8M/RhqiLqy\nBmZiaCPlSp10ulqRidIWZpgHQBXUu8iSNkRsBhrG3KI8XOHo4VT8Ebvx6ToG\n034CjFGl47XesdwRdyWT3kVm4GsKAf2by+MW3QNEiGYkZdGiZQLvOl166eNd\nqA5YAgIXzO4VgvZo96ZkhDfhP3kJIvy94Jmhfl5jWQimSo6W1SR6EbYjohN2\n0RGwBwD5EblbvXZSHlYgFnhhM9gFyvpDcEdZp7meZR29g7vbJq9WVjcHe2Oy\nohP+\r\n=Yer6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXDFkbIekSDI3rGgNcbdu2KWanCmSMN4cgONixvkgitgIhANZngx9YtKOhOG9NAx9q7mGXI+2plhDdj+CpFP+5afsF"}],"size":4656,"noattachment":false,"key":"/popsicle-retry/-/popsicle-retry-4.0.0.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/popsicle-retry_4.0.0_1560118756600_0.8153613474743531"},"_hasShrinkwrap":false,"readme":"# Popsicle Retry\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\n> Enable request retry for Popsicle.\n\n## Installation\n\n```\nnpm install popsicle-retry --save\n```\n\n## Usage\n\n```js\nimport { retry } from \"popsicle-retry\";\n\nconst send = retry(transport);\nconst res = await send(req);\n```\n\n### Methods\n\n- **retry(fn, shouldRetry?)** Wraps a request function with retry support. Accepts a second function that returns a delay, or `-1` (default is `retries()`).\n- **retryAllowed(error?, request?)** Check if a request should be retried. Defaults to `5xx` and unavailable errors.\n- **retries(count?, isRetryAllowed?)** An exponential back-off function, defaulting to 3 retries.\n\n## License\n\nApache 2.0\n\n[npm-image]: https://img.shields.io/npm/v/popsicle-retry.svg?style=flat\n[npm-url]: https://npmjs.org/package/popsicle-retry\n[downloads-image]: https://img.shields.io/npm/dm/popsicle-retry.svg?style=flat\n[downloads-url]: https://npmjs.org/package/popsicle-retry\n[travis-image]: https://img.shields.io/travis/serviejs/popsicle-retry.svg?style=flat\n[travis-url]: https://travis-ci.org/serviejs/popsicle-retry\n[coveralls-image]: https://img.shields.io/coveralls/serviejs/popsicle-retry.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/serviejs/popsicle-retry?branch=master\n","publish_time":1560118756728,"_cnpm_publish_time":1560118756728,"dist-tags":{"latest":"4.1.0"}}