{"_id":"@1xtr/axios-rate-limit","_rev":"2-cf60de926922cd99e90e7cebaa35ea90","name":"@1xtr/axios-rate-limit","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@1xtr/axios-rate-limit","description":"Rate limit for axios.","version":"1.0.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/1xtr/axios-rate-limit.git"},"homepage":"https://github.com/1xtr/axios-rate-limit.git#readme","devDependencies":{"@logux/eslint-config":"^28.1.0","axios":"^0.18.0","eslint":"^5.16.0","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.17.2","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.1.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","husky":"^1.3.1","jest":"^24.7.1","lint-staged":"^8.1.5","sinon":"^7.3.2","yaspeller-ci":"^1.0.0"},"peerDependencies":{"axios":"*"},"main":"src/index.js","typings":"typings/index.d.ts","scripts":{"watch":"yarn jest --watch","test":"jest --forceExit --runInBand --coverage --detectOpenHandles && yarn lint && yarn spell","lint":"eslint-ci src/*.js __tests__/*.js","spell":"yaspeller-ci *.md"},"jest":{"verbose":true,"moduleFileExtensions":["js"],"moduleDirectories":["node_modules"],"coveragePathIgnorePatterns":["/node_modules/"]},"eslintConfig":{"plugins":["jest"],"extends":"@logux/eslint-config/browser","env":{"jest/globals":true},"rules":{"max-len":["error",{"ignoreComments":true}]}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"keywords":["axios","rate","limit"],"author":{"name":"Aleksei Anisimov","email":"postaas@gmail.com"},"yaspeller":{"lang":"en","dictionary":["Cifronomika","axios","Versioning","jsdoc","github","aishek","mcuppi","com","NodeJS","TypeScript","Unreleased","unref","maxRPS","setMaxRPS","getMaxRPS","setRateLimitOptions","lodash"]},"gitHead":"32f3b8bcc31fe5db04dba10edb74690c10c206b3","bugs":{"url":"https://github.com/1xtr/axios-rate-limit/issues"},"_id":"@1xtr/axios-rate-limit@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-5vDgnGeVWqP1WA/LIt2dL6VP4KYhAkwLK/S/xpio3LGp8dmjFoJJ59KVoNx9eD+1kP+g2XH9OXtkZwMN8pIR6A==","shasum":"78cbb6cc7a9fd32a8c6d6d82c82b48d89b7358b7","tarball":"https://registry.npmjs.org/@1xtr/axios-rate-limit/-/axios-rate-limit-1.0.0.tgz","fileCount":5,"unpackedSize":11007,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3vEtCqDzPGFK+HolaMwuBwt8I1Gv1aEQZijgWmMOVtAiEAjuOqJurN3xNLnbCv3i6M5gfJaPLnpry2GZuwbOVJV24="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiakrsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBWA//Qt1fKcwwm3SY0MOjXMt+O2vJ3ZuBi+Y+JkiCOvgApyU82UvX\r\nmmz3XolIuVX1QCBb4BAbuEWLgSmNivk0rchmlITP+hGqUCE92uGgtP3emfHp\r\njUp75f+YHnEkkDObOXUbn38hV01+EQ2WvWOD/0K+AO+EwDYULsaGOOrYCe/T\r\n3tNGIuRafcUV4hHu0fjX8QWzjmArP4VmBwDL/PiIcNOj+E6jQ+uS7r3ZgeAX\r\nAn/ZzlykL7U/+cPtTJtZZmsGTfr4//07NVMIflhLVTIJFuUPGs5SvT4stKm8\r\nfRkGd2NbWE8rox9Kj9qKCYMDZO0crgxeVll8BsiP1z/bI+mcfAuuvtaGFhDQ\r\nwhrXAvIaZgV47AvDYn/PeLZXZzbeOvfvUfXhRPbEi/a1WyNWarUUNSq61NuY\r\nPHD0SvjPseFv9/qRyw9etSn8a/EJP4Xn48W9DzhtxPq6RCmrIN1QBKjnJg9f\r\njAcXD11vEuckf4CfgNT0qDbnijoA4j6UtMs2RkXTvv0JkQEIdetPQkMWJZ86\r\no+0zRjMMlGa3hAKNvWoMAopa7wOiLylN6IHVt9pvYJaD7WDO3Q34djHB7+sS\r\nHv/5hzE9rEfyBj9AifcejhQ88sMOZBjYCyv4cQzwqrLqNu6zwgr1JPyrzQCU\r\n79RY0nxNB5OqS0tWa6+5v6WTYKVw/9v9JsA=\r\n=s+zC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1xtr","email":"post.aas@gmail.com"},"directories":{},"maintainers":[{"name":"1xtr","email":"post.aas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios-rate-limit_1.0.0_1651133164430_0.9933786431539202"},"_hasShrinkwrap":false},"1.0.1":{"name":"@1xtr/axios-rate-limit","description":"Rate limit for axios.","version":"1.0.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/1xtr/axios-rate-limit.git"},"homepage":"https://github.com/1xtr/axios-rate-limit.git#readme","devDependencies":{"@logux/eslint-config":"^28.1.0","axios":"^0.18.0","eslint":"^5.16.0","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.17.2","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.1.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","husky":"^1.3.1","jest":"^24.7.1","lint-staged":"^8.1.5","sinon":"^7.3.2","yaspeller-ci":"^1.0.0"},"peerDependencies":{"axios":"*"},"main":"src/index.js","typings":"typings/index.d.ts","scripts":{"watch":"yarn jest --watch","test":"jest --forceExit --runInBand --coverage --detectOpenHandles && yarn lint && yarn spell","lint":"eslint-ci src/*.js __tests__/*.js","spell":"yaspeller-ci *.md"},"jest":{"verbose":true,"moduleFileExtensions":["js"],"moduleDirectories":["node_modules"],"coveragePathIgnorePatterns":["/node_modules/"]},"eslintConfig":{"plugins":["jest"],"extends":"@logux/eslint-config/browser","env":{"jest/globals":true},"rules":{"max-len":["error",{"ignoreComments":true}]}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"keywords":["axios","rate","limit"],"author":{"name":"Aleksei Anisimov","email":"postaas@gmail.com"},"yaspeller":{"lang":"en","dictionary":["axios","Versioning","jsdoc","github","aishek","mcuppi","com","NodeJS","TypeScript","Unreleased","unref","maxRPS","setMaxRPS","getMaxRPS","setRateLimitOptions","lodash"]},"gitHead":"015225efdc2af98557d0851d7ab0b7690b6f4a05","bugs":{"url":"https://github.com/1xtr/axios-rate-limit/issues"},"_id":"@1xtr/axios-rate-limit@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-zBnWEZoIkKrnDkuquizSHX5ORdPM4I+19q4fxC0zcCcx91Av+qovyJODTql4idl8j8aikUGJz2IeEouWG0McaA==","shasum":"02867d9f9243a1b159bc65abf6a14985e4d85a74","tarball":"https://registry.npmjs.org/@1xtr/axios-rate-limit/-/axios-rate-limit-1.0.1.tgz","fileCount":5,"unpackedSize":10727,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDg2f4W85v1xMCyA0b9hlUoZmyUBZUTOXNfyQUDGEP9mAiBEhz0+NM1gnRuI84zw0x5u34DoCD8VCINEcNg2OX9Pag=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJialQaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrf2g//YD52yxhsMH8epF/KZZGFabcAOAJtg/wvAMWXb7qFwQSmoUgp\r\nd0r02f9txhP8h2BMS67ey1r3m3tnNzLBECkLE3+ySBHiAL/4HBtRPOW/Hydf\r\nXhUuyhA0px2e1razoXairHP7wkjSIweCCipEt7T3ObTseG1NI0YPap5AD+lh\r\nMq4cMYtZteVq41EVNkIlZuL0UJqLSQ1bfUYuKqJJKP0UhePv2VBzRm1rbAVN\r\nfzmxz/8J7k0nCHnIm4jDGgdsK8s91XILbmei+sHhp1kQY7rX762WLOOMflfD\r\nW5ia3+wPMQ6C7GY6W7Bbif9Xwizgad1Kykomy9ttII4WbXPNTQ/KOdftfg/n\r\nBY9ElGwwLpXBYx2UkG6V4epP88BVV8TnOmIYJZRSl8pF64YsOzvjJH2M66NU\r\n4Je5xUKQHIPqKLB6/TFkVsxdePyD15mEvmFrKH7Ggzr7Uk+6WycRIfz7gZjx\r\n1mUZ3qk9B04yi9aA5viXPV+zZXRw+b9K47yOQ6f6pa3EyVhJoi7gCb9+GJgN\r\nYanzSdB1lum7iEulQcJS6l9vNqofhCvSS5P+6cRuxyaiB+uiOIWaoG/54HeE\r\ndYbNaKbB3eG2VqqrIxBOu5F29qeVZCnVC2VcPJzgNvNQJUj6IwswflaBeeII\r\nHTS/cKgiMAzQ34IXfXSsN3UwhzW28A6VRKI=\r\n=KVi7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1xtr","email":"post.aas@gmail.com"},"directories":{},"maintainers":[{"name":"1xtr","email":"post.aas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios-rate-limit_1.0.1_1651135514089_0.2571718457080405"},"_hasShrinkwrap":false},"1.0.2":{"name":"@1xtr/axios-rate-limit","description":"Rate limit for axios.","version":"1.0.2","license":"MIT","repository":{"type":"git","url":"git+https://github.com/1xtr/axios-rate-limit.git"},"homepage":"https://github.com/1xtr/axios-rate-limit.git#readme","devDependencies":{"@logux/eslint-config":"^47.2.0","@typescript-eslint/eslint-plugin":"^5.22.0","@typescript-eslint/parser":"^5.22.0","axios":"^0.27.2","eslint":"^8.14.0","eslint-ci":"^1.0.0","eslint-config-standard":"^17.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.17.2","eslint-plugin-import-helpers":"^1.2.1","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^6.0.0","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","husky":"^1.3.1","jest":"^28.0.2","lint-staged":"^12.4.1","sinon":"^7.3.2","yaspeller-ci":"^1.0.0"},"peerDependencies":{"axios":"*"},"main":"src/index.js","typings":"typings/index.d.ts","scripts":{"watch":"yarn jest --watch","test":"jest --forceExit --runInBand --coverage --detectOpenHandles && yarn lint && yarn spell","lint":"eslint src/index.js __tests__/index.js","jest":"jest src/index.js __tests__/index.js","spell":"yaspeller-ci *.md"},"jest":{"verbose":true,"moduleFileExtensions":["js"],"moduleDirectories":["node_modules"],"coveragePathIgnorePatterns":["/node_modules/"]},"eslintConfig":{"plugins":["jest"],"extends":["@logux/eslint-config","plugin:@typescript-eslint/recommended"],"env":{"jest/globals":true},"rules":{"max-len":["error",{"ignoreComments":true}],"@typescript-eslint/no-var-requires":0}},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"keywords":["axios","rate","limit"],"author":{"name":"Aleksei Anisimov","email":"i@extra-dev.ru"},"yaspeller":{"lang":"en","dictionary":["axios","Versioning","jsdoc","github","aishek","mcuppi","com","NodeJS","TypeScript","Unreleased","unref","maxRPS","setMaxRPS","getMaxRPS","setRateLimitOptions","lodash"]},"gitHead":"7a3b5c2941d27612a237f966c621c02750f7d106","bugs":{"url":"https://github.com/1xtr/axios-rate-limit/issues"},"_id":"@1xtr/axios-rate-limit@1.0.2","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-GZ2WWVqPpaGJ+GeSROIYYkBR0+FMUoGDUrZ+L+YNoqo8uIbOpFUUOa1g+T2QijOKhh9JifPmzBpjLajId1vSpg==","shasum":"fd3e53723d64a9ccef8e7fc31e0b1ea6d785b39b","tarball":"https://registry.npmjs.org/@1xtr/axios-rate-limit/-/axios-rate-limit-1.0.2.tgz","fileCount":5,"unpackedSize":11567,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgEkKx94BGustO9wadbV3vyPZM/Lrg6UTKg6ueHKzUNAiEAvxZi/1piqIWbZDzS2SItH5Aw/4fVtMHVwFoCzYdCEY0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJic/RbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFaRAAmMBk+7OFao8ehbhQ1+C1+NpI2bTK5beI1e2t5vAJm2Emd6jF\r\nuAPdGkout6PG81QreaYhvASP9azO4fu5jf7Lf2PkMm5zNLaui89nNhJ5aIqG\r\nmqlDtZbgQxZkd4jxMR85L+w4Ww1K7rQ3x4f8F0k9cCsw9xaPbMmZ1l0qCwHW\r\nfwCCOvDp6ZfHScniNTVntZBLGv7CzpcxWO/RHW2bLenFhla5ISBfn5DyRhvo\r\nUIPllix8foe7IsY2G8e36t9xKlPQr3bNTssoAF9P3kw+gSoKccUAYyz5Pi1h\r\nO//3AexZZqfT9N0SjtNeXlYM7CIFnc2p8GioKBEEUiAnPZN6VLTsIiZ4wWFb\r\nRA9gNEB+Ska/qZsgU/ZyS+kw1e9L1UiEDStVMSaAoheQ0A6GurBZS0z1kY33\r\nqjh7T/BUjJsQcTNNqbVDkr0MbnfKLmyvBMqWTxuWMarI9x+i7EMUJHQWs9ts\r\noMc8uJdc926bxse+CjglLMpfZBlDFonFoF1aHtLhanug68WFW43TGOe0IlcZ\r\nTg9T7/RwxCtIuQM16IdzHwUhW0ICvymOj9bG8xP9dClT3TeqDk5LQuFx6Dfx\r\nILIcRgZa9Bq/LC2NWahLMP5u6xLRth+/u+wYiYYbobyHvNRl/ZYb23mRFm9m\r\nlbDPe4bxBBqR8RcKPE6gVjCs0MaLmspPo04=\r\n=tT3L\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"1xtr","email":"post.aas@gmail.com"},"directories":{},"maintainers":[{"name":"1xtr","email":"post.aas@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios-rate-limit_1.0.2_1651766363541_0.7804056756399653"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-28T08:06:04.383Z","1.0.0":"2022-04-28T08:06:04.568Z","modified":"2022-05-05T15:59:23.743Z","1.0.1":"2022-04-28T08:45:14.269Z","1.0.2":"2022-05-05T15:59:23.672Z"},"maintainers":[{"name":"1xtr","email":"post.aas@gmail.com"}],"description":"Rate limit for axios.","homepage":"https://github.com/1xtr/axios-rate-limit.git#readme","keywords":["axios","rate","limit"],"repository":{"type":"git","url":"git+https://github.com/1xtr/axios-rate-limit.git"},"author":{"name":"Aleksei Anisimov","email":"i@extra-dev.ru"},"bugs":{"url":"https://github.com/1xtr/axios-rate-limit/issues"},"license":"MIT","readme":"# Fork of axios-rate-limit\n\n[![npm version](https://img.shields.io/npm/v/@1xtr/axios-rate-limit.svg?style=flat-square)](https://www.npmjs.com/package/axios-rate-limit)\n\nA rate limit for axios: set how many requests per interval should perform immediately, other will be delayed automatically.\n\n## Installing\n\n```bash\nyarn add @1xtr/axios-rate-limit\n```\n\n## Usage\n\n```javascript\nimport axios from 'axios';\nimport rateLimit from 'axios-rate-limit';\n\n// sets max 2 requests per 1 second, other will be delayed\n// note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence\n// if specified both with maxRequests and perMilliseconds\nconst http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })\nhttp.getMaxRPS() // 2\nhttp.get('https://example.com/api/v1/users.json?page=1') // will perform immediately\nhttp.get('https://example.com/api/v1/users.json?page=2') // will perform immediately\nhttp.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one\n\n// options hot-reloading also available\nhttp.setMaxRPS(3)\nhttp.getMaxRPS() // 3\nhttp.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor\n```\n","readmeFilename":"README.md"}