{"_id":"smart-request-balancer","_rev":"10-260f92d05c6b8c51c40257c05b6bc236","name":"smart-request-balancer","dist-tags":{"latest":"2.2.0"},"versions":{"1.0.0":{"name":"smart-request-balancer","version":"1.0.0","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","test":"mocha --reporter spec test/**/*","prepare":"npm run build","prepublishOnly":"npm test","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"author":{"name":"energizer91"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/debug":"^4.1.1","@types/uuid":"^3.4.4","chai":"^4.2.0","mocha":"^6.0.0","sinon":"^7.2.4","sinon-chai":"^3.3.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"b6ee39a1d91e889f7916fc2a77048e2b5a0f0da4","_id":"smart-request-balancer@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-nwpoPvj60H3ubJc7UVtfm8hF7P7bP9OkPE5FKONuJdWVs5KvJv1TNcfWRGON3iQhoDayAnuW0xl6U2dVZUuVFA==","shasum":"819eedc4230bfbc0d4ae55c8ecfc2e7cd830e85b","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-1.0.0.tgz","fileCount":5,"unpackedSize":23668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbSyuCRA9TVsSAnZWagAAKLMP/RmvDxQFi1GnFnfRIPvn\n2BXMwYMkQmAnAYZ0AaUlFRTUmi1dHEDXVFn/Ac26yhIwAFu3RZ8A6NBPqu1K\nWXufp6IYwu76cfRV5OwEfLWQBE9iA4o4r2cp/BDUS3isFFlYj+m5yNPuHF4i\n9CqgSua8TsFgDmaNV3qdxGarXGUzQGrj970FXxpJDdckp7as0zeSUXueM2jW\nQg0MaGGTg1vUkKRXF/hLvOD5ReuOlQctt/mAZQoqG3+efNRUwZ/lnZHnA57u\nPumxL9WtisC/W1WbTFEdsygYvD9moFv/3Pj5LjZcx0v1v9m81rGlYJi7xDt6\ndL/Oc6Oj91IdqS9QBwe/fHT9IerboCYxWlt+Ti6TEmzfkuwQlBGXisAaSSSU\nhCGT/vXxdiP1AvjeQnOmH3S+rJMuPzIZLEWUN913Ziykl+7dYzYw+L9yA8VZ\nHEHvVoxr4mbujn+oQAf4/WPAa4AWgkX6bKFTnsAu2gBepU5XEycqFzj4/hmJ\nVw+7wTTLB799kw5wX8FuwsTAiFR+afroI//3tbpGvanvsZEEVCSzs0hd4Iro\nmSzZ8fGleeiXcZ2IJ90CU8PQfLQGjCLFaNAV/vAeHq2/ZqED3SI2P1+Z8kNu\nAnum2/pdJCqd4NFRr6TseFdRStrnfihDkWYuRUf9mOSgcUqfLHKgWXtQTY3w\ntUYK\r\n=8N1W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDYrH57AmPtt5bsw7i+2PlXBrvtQcNgHY+c6Y4MSwbhAiEAh1WbrelU+Hr/ijPv2gDNuKJR96At81n/aQfIt30pk2I="}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_1.0.0_1550658733301_0.00922653527731132"},"_hasShrinkwrap":false},"1.0.1":{"name":"smart-request-balancer","version":"1.0.1","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","lint":"tslint -p tsconfig.json","test":"mocha --reporter spec test/**/*","cover":"nyc mocha test/**/*","coverage":"nyc report --reporter=text-lcov | coveralls","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"author":{"name":"energizer91"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/debug":"^4.1.1","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","sinon":"^7.2.4","sinon-chai":"^3.3.0","tslint":"^5.12.1","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"97c3cb61a0e97d429397d3728f4edebebeb36d30","_id":"smart-request-balancer@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-CpTV+l6aojp24SJm+qWOOXSa1ljtayeArvug6Ro7pZ0eZqukA8/pSw8nMzPm1eoqBhdEskAFx7XU08vBXtgzmw==","shasum":"66a7ca07a5f8f325bba37b6c33bf81e67bf145b0","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-1.0.1.tgz","fileCount":5,"unpackedSize":23918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbWapCRA9TVsSAnZWagAAywAP/iX7SKUo9XXNQpKM/t54\nj5qN/Bh43YiWfarsxx9kZlqFpIOZ0dACVwkeYp6d7yaEe+r7B03+ZJJS1fb6\nZnF/98FODiwR5KQKICVgUYyHFGHVHqjt1M9GJx6XbiKqUFQzTZEsYyeT8CWw\nMdr2zSjPIq9dhkYGExMH6/nIQ0uoDAaimqHo3XkyYGqkyH6M0sMubSaIP7kw\nwq/YZF2GETR675lsRhCFEYIy0WaAbw6h+cDAvPZg7oBIDlg/2Sq9Z5tRYdi7\nR+N0GHeFD83X/u/WpY4JWEp/xrnhzPAdjFLScGrc7xx/RJbjBRlpNXdBBsEj\nH/CBwLUI4tgEEVNrjefgLJ+ZUL0CeYeItGNsaZ7yW4SY2kWNf2NBiFlX01On\nn1pEq9ozU7Jh/21P/MbbR3jUxUzeAbrufvIsA9eO748wL4prOt7t5nn1H748\nJJMe5nKWjfIdMzSJQo4+fp/IBRWbQirFsc+vvGDPWxUhuW0amaXHL7gKWv12\n9lZ7MpynppGgewuUMdVrOOfebrTQ7KoseNm5zQW0xQu22DFOphRNnTR4kzIr\n1zI7D55VtjHkEkbPNrwuyX8FwXmUxbdNXGCC9fZKuBrG61jOGPE9lvM2LrGe\n9ovjrtKgEVqpMO4EfSKiRWj0tmXJo8p4pZ9AyGL+wCQtdl84t2DcOw1LBJ9c\nWm06\r\n=fs3p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk6OQVZ3w5kHHL32Bnb616s44+1HEMlS8dGH369lOyUwIhANNy6o7qxDgoT/AxLCifaC51hBXNqhJili4Gb8uDkEmQ"}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_1.0.1_1550673577094_0.3239378555729653"},"_hasShrinkwrap":false},"1.1.0":{"name":"smart-request-balancer","version":"1.1.0","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.js\"","lint":"tslint -p tsconfig.json","test":"mocha --reporter spec test/**/*","cover":"nyc mocha test/**/*","coverage":"nyc report --reporter=text-lcov | coveralls","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"author":{"name":"energizer91"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/debug":"^4.1.1","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"95768733dbe46c5c83865fab07a1cb42eaef6558","_id":"smart-request-balancer@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-Kd2JkvDfP9rxy9Sp3rU6Ym3eWT+DAOoqHiTlclFEXlrdTtalA2LUUsFaLaN1o5I+GoM7YsZZjhsYqYon8OXbbA==","shasum":"a0e5f3db8f4057d63d939479ef8311b3f30d11a1","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-1.1.0.tgz","fileCount":5,"unpackedSize":25336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccnUqCRA9TVsSAnZWagAATJ0P/33KumNMQtghLWPufFZ3\ncpagbOWa3EFFhtRzV0Or/+0sQ+Ej8Ck17y/mlwa7FkNNOeH1Pzqiz5IwaEoi\nE7njOl7TewvaArqe7Zi4MOyYFwmTAOo3hvAlk8ddgi4jio6YDlP+rsN9Vs7h\nssMLRwi4gRVRABF8bVO0ruZ0oUK7UIJmyxpxoSJOGBCeoRDSMxaWhYm61/za\n39LtVSuJwKwpU++X/N9SwQ8BcvFB8Us5NGaNpZmdgJmJfA70tsOTQmqfqNl/\n8I7CZ6Sl9wQKzuPiBVX0JajkbPSfm2hsLavXDI4d8uTrHZPnpN5eLFvKiA5u\n7yAlDw5UGFF8jmO1x1qZekQHGX/uYNxcsY6wWSI6fI0XmsgZVFFlWnQxykBQ\nPEP63Dee9/uM6jhaqTmX2sYpZNoDQoFnbk7vzbcS5n4jGpQfySdf62GKVCzr\nSRgn55nCg+/xVieqX2ymb/Nwuu7r1f7U0IPD1mGQRW03MVnPAESblezBUvyw\n2XPGFRe6XzZ1DcWoarAoFRNmAos5RiQeXd+zOdfsV1Y+eKQgF5DD322rRMH1\nLL1JttNotIN4eVodH4liikYlypqZ5My9HPZ3iQi3BKAaYlYUEHS1mVFOcJLU\nLwmJXDRNChT3GOM67T1KwLP3QyzmI5HJUrUreX4+AjRUJeMWr/DaZl0BeI2G\nCbZC\r\n=ibVp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDjKSp7TLBe3YJosdy8uig+md05s/kpcBk0x4A5cCupYAiEAt2n2uGDrmdgYkyjIMXuK/ylrolveBDUlee3wug0ezSk="}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_1.1.0_1551004970039_0.3459008554597136"},"_hasShrinkwrap":false},"1.1.1":{"name":"smart-request-balancer","version":"1.1.1","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov | coveralls","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"7eb39b7f1971a4f6faede9f6174f7fdfde71c1f5","_id":"smart-request-balancer@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-561lTBIdacHJIqd/yhU6+fG+reju6NzW/y/VUT3gSq/d1CjdVd4kV3n/enqvAF1Dsthiog1CvafX5DtrllMVxg==","shasum":"d7256a0cd92e517c32b625296c770340069c4ecc","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-1.1.1.tgz","fileCount":9,"unpackedSize":58009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceEdPCRA9TVsSAnZWagAAivoQAJaRY7/YB4gvEoSOGJ8+\n4w4roVVjHcGvsFwvdviv5Lh/rCgoqGaE6EWYasFAcR3y5Lff7BdbAhSQCtsO\nk5y8j0TRRvlWcuve8FNy1VL92BrNnz8gtzfFy0zhoJeXJwXBzI6eavZg8UcO\ngeaYr0Q2Usr6S2p+W4wLWnZCBfjPn2JnKWzVGX7sS0XVZz0QhjGX2dM3mE32\nBeNUrkwYMn8MDQJhppk2LpcfliPRvyRSrRaxjCnEZwtn3nTCmJFXvJ2Gnoco\nT0ZJtWg9EZry1RIql2mDVLtvSrBiTkk7qJjn7XJyONwLL+ooQFAUrsu1AehJ\n/DkHXPh6tMc4XXERqyyHBkwzVQ+bKrIgG3NzWYJEUWgaGiMJysJVn3+Ku6LU\nfCxbzn2IFB6JVSu37nJvTSpbS8VZB39W+O+UFgA2KDBoBDz1E+PBazWOB1Ry\nMGp2bQvSlMRzwCJnSBW8W3SqSt8g4RFOVDaxksG6Dmd/3211RK7RWb+rBV0Y\nQRgz9r9+uc9RhB7e1KxTrN+3c/y3LOcEKDl8Lc3rY+dwtZnH8ZrVUZJjie36\nJX13KW0Ar19Yxm5CgliROrhog9khxa2wfybZAAM3sgAvx+/GaEILB7Fzodd+\n8tz7N1gb0RdKfJUjdatePtrFWw5ZtcbUuHVF6fjz6RVQSD7H1ijBvq7MH9Ni\nvHKz\r\n=HZwl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTZRuUHCPKCoEc0RMoE+cdBdODu/PbbAAsrCgzZC2CegIhAJseIW+h8vkHv6TjhASCRF2CHYR3rpEux876b3XOzc0B"}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_1.1.1_1551386446953_0.8189976283611757"},"_hasShrinkwrap":false},"1.1.2":{"name":"smart-request-balancer","version":"1.1.2","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov | coveralls","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"fd40f29a425578b25876029551774f6e4b6bddb6","_id":"smart-request-balancer@1.1.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-5soFg/agPhdeZG+XDzW2Z/jU1P4zAdmNQcCIpp6srlbdIJk2htioODI+ArOkT4glljzGHyVSurZrzvc6oHvkLQ==","shasum":"51497aa179e2559ae50f8f01608732c3c7e60d32","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-1.1.2.tgz","fileCount":9,"unpackedSize":50556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+ibxCRA9TVsSAnZWagAAIdsP/08gMglMeT4nfFxoI5Q9\n9bBXzEI04+I1bloSkq2EhyikuhxNYFFS2CM1KCcbmi5SgxFJhS6ig8sMl5ui\n1k+hGXjtJPs++rsYcGA4q/hlTWdWkJ1kXEuDGRSN6dDHbaZjl74PL74lxNrJ\np758/SPHSRQQVwicXKU1zv9J9NIrhrFkX6U8vhZTTMEhQyxbL6xfN2WIxefR\nwyMovdGvR6iKTmJQT38vNB5cYX0w9nGiHj3WMy/XtERlUq1AGWTvj9TnYoaB\nVjvc/uyPQz358RLuhYCM0p9YcWZp02xcAVheUj6Dr4O35SCxUf7cZMSSp+jj\nM/63qcXI6EtdeBuIOBLHIKR3dBv8+1zldszgIRfTotG3D0B10QHbPlizAITe\ndFHzNSH36ochv8Ck6zIYXgN4zE63CDBXlr4WMG4BlNF/Z6OCqJ+o4IuC2inl\niLbrh24ixbae4yaGqDJkxD2DnXahNZFDDerisb3rKi2jF10gVaWRRyEZTjd4\nJxhpszssoxviw6SDpJ+T6VXsOuJvhIwIFVdTC2dTrFHtqCHafQiqrIgmQ4O9\ns1Jd4neTtNvtF6v5qLjxdAeTW7OfmftBlYXau3ZoXhsdYHrjVTP7sKaMyYAr\nOS1+ggFeaIQ/h9RJLWYOlivoenmYiRGCFtZMviCS3V5bs8lw+tb0Rn7Zs+2E\n+P0U\r\n=+5f2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb3/WNAsSlYGzqpO/wDojkhF47VDiKydIvaqP6GVAzjQIgAUKrn0ImP/OmbEe7i8bW9WmuRvsIUC18yO+suE7+vzw="}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_1.1.2_1559897838305_0.5851020276341341"},"_hasShrinkwrap":false},"2.0.0":{"name":"smart-request-balancer","version":"2.0.0","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov | coveralls","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"7aeec4a6ce35a21fb0a508fda5e4bd1a4ac39366","_id":"smart-request-balancer@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"dist":{"integrity":"sha512-mLD39gNWaAAMfoE5q3x3pyei357jB873hyQ3T5RM1iWAOvnJ0b0LgdS8WfBE2255sVTEAK84o23aBT/Fwuaw5w==","shasum":"9733c48c133321a38c54a89b77b020a94685bdbf","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-2.0.0.tgz","fileCount":9,"unpackedSize":58010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSeHmCRA9TVsSAnZWagAAp4cP/Rx24K5UriyA4FBj+ZDZ\n89OXayyHXoyqK/MjXRnCWw0dTYcuR57H5IQFunkAnxkdVrFIhNcRb3aRnG+J\nW/xH39cZPtaskNSKg1DeY5XrBeMFu8IjHClJfKvOETXer6L0NWYpX7lRHTdD\np0SO1byvCNWupObdJRQIvbJuxUQseiN6jJ80eKfDURQRs6deS9vU/ga0Y9mb\n38Z09U9q48GtmXAdkQfwbk1CfP4RYidVxm4Qpiue3pL/pvkDFUSY/vtxRsqU\nePq+guNcFPTDMPuSa2ut6ZrmNuiDCcHuEbjJWFZlvaK6Zuk75JHIEUKYLjOk\nRRUj+4WnPtODa/zP2F0b9SRVnEmIWE63XzA3D82GsZYeFBPJ2AD8i3IuWcBW\nzJALTEwh/VJL5nh535EPJWhNU2+DrJuYyBz2CRWxyQowK8c1ki4ntqnkLI73\n6tJSWg5gMk/p2xUD8FM8dnozTsy6maeXG0udjkcLSVyCHpGBf6+UxZRkMYBz\nLV5WZJpbRXxk4H/Ufn4AqTPcdl3fDxWRBRjNnOe4UbeHP7p6APS+8F2PVYms\nWwZyUgjeOmF3Ausguau95w4ukTWZmIXZAO8vRdFVO7rLaGP1NznGnwkD0n4X\nrEHG4SUp4zgF8G5ZDM8TCFBnaKa+IRLvDZNkVd6kiwEc2n+uGY0o2hnEUxZg\n3Dh2\r\n=ZB4n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbjT2yUaMn+bfGCR0zs+eLkKwitTjzAsXDFG1/wc5UzgIgTtgUCnfK4ryolL1Gho6CJ5eLV2KFkcRCgQWPN9YK9DU="}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_2.0.0_1565123045314_0.6322900053935585"},"_hasShrinkwrap":false},"2.0.4":{"name":"smart-request-balancer","version":"2.0.4","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov > lcov.info","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/node":"^13.5.3","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"c90fa0c4a676f849e606a6fecffa4f49a025c725","_id":"smart-request-balancer@2.0.4","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ddr2cEboXkffs29rjkDhNDlW1DmGALYLcJDlYQ0JVz5Z5LR3lUZPaik8I0yl92f3k3213A1wqHguwKjN4PF6kQ==","shasum":"02fe7da7d23e6a5f829acd96e4eed3cc16db6586","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-2.0.4.tgz","fileCount":7,"unpackedSize":46211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNCPMCRA9TVsSAnZWagAAUOcP+QF6q4DjLqUz56GhSLUx\nM8iqrdcuGjCTdHKtMJznvyMA3mMQ88HdJhO1KNdKtGGt6Y4WHPXZPcHYnltZ\nEUEcle664IP31JeG9eT0fjbOHV4CpVFUecLNSabYiSI/17NcVJZQgJvlkNqa\n3WpoW4j7nQYLmBvPslMyPDpN9M2T3GdfXSFSyr/aYi3cuUqR17v64eoxbgsr\nWe5RP8p+yUHKElu4JhKm9/HGSKgwMV7QVLlt6ARg6uELtAnaujRupGgdwegI\nf0Y7OKk4qjxND04hLE/5DvDCYUT22jfBd4ZxQUZTPyuv8DVDjmRisFQtaOAV\n3rOLRjDZLnmoikPxW7iYZnK9737vhOZT4CEsUEhMAHWzO98+3gZu16JkZaxO\n/Fo9VZKoGwBLt5+LfwT6kJ77EbYhkkwWqQVR4XVUdEpf9M0ezuH+ILmzW7sj\nr4FPrPCRXscbfHF+bMVYPRCZgUISKccglUiATZPm50BpeKDbwQ8pgiY3knla\n5ctVtVPe3N5Rt+LqHMHVJtfo5Ec3/6AognGHoo019m4laN/S74BecxNxS0xO\ndxHGVMaSQ7ZBXWpttsaGqL5oXqdjPLYco+zCJutAXN0ya9MNAULcqxZNtrXq\n43n2HqmDHqsKLP6Cs46B0hTx+Tz7FpTTTbZIV4aAZGTAe1SVbqg6M/IH1764\nJ0pB\r\n=7u46\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBr7ONgvbgryH/3XhwkOEJeUkvyygP+H2UPtumsyr6awIhAIjxXPkk8tTVLUyHWbyzQwnD7qRXS2UUkFNbJ26Jy246"}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_2.0.4_1580475339866_0.5645582846053923"},"_hasShrinkwrap":false},"2.1.0":{"name":"smart-request-balancer","version":"2.1.0","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov > lcov.info","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/node":"^13.5.3","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"4f89a4b466877a275dc814f1d7fd42aafb11d20a","_id":"smart-request-balancer@2.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-0WOt5NfoTG9nJ5J0BKbcErDgTB1Jc5Lof+7e0I/YFWB6mabgzya1polBQTr5xZWgTN5pUee0cl1yLkxna+6lXQ==","shasum":"7279f4980c2b8980d2c292b7546d83eea4ead899","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-2.1.0.tgz","fileCount":7,"unpackedSize":46920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNCnlCRA9TVsSAnZWagAASyQP/00PjXa3YtBDoFnLiVsV\ny8+TCKJHHtAyj0uyS9oc7+uZmNe85ogjCmMkpS0dTKF5bSd0YbZSOUrtgQtL\nTFM8xoiWAGVP+eu0XGY+gDD5q5PGeA5GmJc+TG32G8ni3rV9C9bFg+yGiuUg\n4Lnu1gyK/Gs0+eKv7+XYkJnrDsu4SWyCZgmfZHAtu7lNRZNJUeeYA42hQYQB\na6L355YbWoWkD3JR46gApwfoyCY3sNa/MLbnBcgHB+mRm1hUljFo+Bqb0hS4\na3bQMp2KSt6qibGO82VjzkVHE/iKqszeeEJQ+Z4pM/G52b+p66bBVYayVWzB\n9C96maXLZQs3rG9Uvvlmt0tqfRZlZ0uxWUSMaoEwsgdi0Pt3VRAHNeKORqFZ\nj9rDOxp6tiody1cZ0rg6afiRMnD9No1J2inueMl2kZxzQLC9QeD8nNMMePLh\nLqDXKnH5zTBBG3zT+7k8R+adih8rfWAaKUHVM0v2JopwTq1K7nRyknhHBFFC\nAjRdZ+Le4SIWzOjuozViFQVmnanPfpLameE+s5/RFyaJz5wOQs9scvyYF8S4\n/nzGYGd4DDmTggVGNZ8+kYNAX45VTmbBMWRNHeYNUVvo0vZ6Kq/6trL4kTCX\nltBLvJSxRBORpLO5z744TJU0uy+jGUpQQPKLMmPT+B1SEi81T1Jhn5RFmDir\nY2e/\r\n=Mb++\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgAHUODmnFVtVmo3IBL+bonVTh9DRh/gX71G7hm6IysAIhAIAO9xzh+xAREPbSW9FZL254zGX0HvpFgFH4PdXPeaas"}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_2.1.0_1580476901041_0.799769840408743"},"_hasShrinkwrap":false},"2.1.1":{"name":"smart-request-balancer","version":"2.1.1","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov > lcov.info","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/node":"^13.5.3","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"^3.0.2","mocha":"^6.0.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{"debug":"^4.1.1","uuid":"^3.3.2"},"gitHead":"c5d4b80adee68aea8b8cde5fe048968b1268b9ee","_id":"smart-request-balancer@2.1.1","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-4AnMhV4amviBUGKeACOricuj4dhihf2P9Z/s3+cvZ3kjFxUwEV74JL9JTdK3/7Im84cC3J9ANeg+sUjSv0buxQ==","shasum":"c6ed666a8dfed2bb0a338cd2cba9aff7526ffcb9","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-2.1.1.tgz","fileCount":5,"unpackedSize":25042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNS6QCRA9TVsSAnZWagAAnz8P/iPgCC0siOpp9XqlW/E2\nlw/xctEoMrQiQ9xwLoL44r2VBnwvWIVMBZ8UKERemaAZmadldZxOmqbZOVeL\n6KVmp/IDK1zusuMWchu2N8TPA6X1JpPp4D4ZhRqExCKE9lEmfxptHyVRE5OT\n0SC8A/imJM4paChu0MfGEgms4R2mSN0cGeXOSD+1GBnhcCbwlNfSX2Bck898\nBuqE6FHo8HOlczig2Y/7+zDUWNcBnEhfmYNm/4LPtn9sNiQxS5b6Ii/QNEhC\nGVTo77k5c7Pm7f73v0HrkGVNr+YznUZW+EtZUv8IQft6QmT82i1OERFzwIwB\nc5t4RNIXCY3uJhQO0e1sklKdnle3IuvIPL8VyAS2c70bKIYUSwvKW5+D1N5O\nfUG7YApGztag1L7cRj//l9CDo/+AsXNXcexRJxudsgof8OoGAHn3EyYNMkBy\nxzyTeEtCkzsqM+AuSgBqtSg+45+Lg5T0GV5J8XP0risFBgX531YmPJZK4wlf\nePbXEhWaG5aNOCCDyujjdDTqstevAea8z8H8BepFlwwMisA9o3kM14GeXjqG\nDuLOoHHHAywfbYDzhj7JJgRfq12fMOnj3xHsdtiu4B4e9ekPK7/PRlxuZXLU\nWmrNvUY50afn1hypi7Nw5T7vXzbnwlTYRxxFtOSTNEjql1qVp7ybCMqi5kQy\npFse\r\n=rKuR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFO1DdYZxGPe1wtCMBi8nQfM0RoJVLE8JLGehnVHegUbAiEA7tSDN0H8Ge9Qtwe+Hpr0TrxQcSYmui56AV3Mhq6OXr4="}]},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_2.1.1_1580543631275_0.2857117542880887"},"_hasShrinkwrap":false},"2.2.0":{"name":"smart-request-balancer","version":"2.2.0","description":"Smart request balancer with fine tuning of rates and limits of queue execution","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc -p tsconfig.build.json","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"mocha -r ts-node/register --reporter spec test/**/*","cover":"nyc mocha -r ts-node/register test/**/*","coverage":"nyc report --reporter=text-lcov > lcov.info","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"keywords":["request","rate","limit","balancer","queue","typescript"],"nyc":{"extension":[".ts"]},"author":{"name":"energizer91"},"license":"MIT","bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"homepage":"https://github.com/energizer91/smart-request-balancer#readme","devDependencies":{"@types/chai":"^4.1.7","@types/debug":"^4.1.1","@types/mocha":"^5.2.6","@types/node":"^13.5.3","@types/sinon":"^7.0.6","@types/sinon-chai":"^3.2.2","@types/uuid":"^3.4.4","chai":"^4.2.0","coveralls":"3.1.1","mocha":"10.1.0","nyc":"^13.3.0","prettier":"^1.16.4","sinon":"^7.2.4","sinon-chai":"^3.3.0","ts-node":"^8.0.2","tslint":"^5.12.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3"},"dependencies":{},"_id":"smart-request-balancer@2.2.0","gitHead":"c988abbc4f86444f7a8ffed7996323dd578f0efc","_nodeVersion":"20.13.1","_npmVersion":"10.5.2","dist":{"integrity":"sha512-dLnPSHTvCngqEfSvuHNEB/Vm9TPZZ49C9K/tem3IidNCUnTaUcYskFgGGmLFrCLyga2Z48LF09TfIvVyn3ROvg==","shasum":"ea0636e95c708725433f1ef3befccd8e4be4b0d1","tarball":"https://registry.npmjs.org/smart-request-balancer/-/smart-request-balancer-2.2.0.tgz","fileCount":5,"unpackedSize":23465,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7Fhb2Q0CHV/IwOkL0FZoPG/P6rHQ/htF9aA1vb0e1YQIhAPQUCcniXyxNYOQ2gYgDqY9q/lfk+tC/4kAJJYgybS24"}]},"_npmUser":{"name":"energizer91","email":"militaryboy@yandex.ru"},"directories":{},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-request-balancer_2.2.0_1715854331248_0.29646190748291534"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-20T10:32:13.300Z","1.0.0":"2019-02-20T10:32:13.588Z","modified":"2024-05-16T10:12:11.612Z","1.0.1":"2019-02-20T14:39:37.308Z","1.1.0":"2019-02-24T10:42:50.216Z","1.1.1":"2019-02-28T20:40:47.137Z","1.1.2":"2019-06-07T08:57:18.477Z","2.0.0":"2019-08-06T20:24:05.438Z","2.0.4":"2020-01-31T12:55:39.974Z","2.1.0":"2020-01-31T13:21:41.238Z","2.1.1":"2020-02-01T07:53:51.421Z","2.2.0":"2024-05-16T10:12:11.421Z"},"maintainers":[{"name":"energizer91","email":"militaryboy@yandex.ru"}],"description":"Smart request balancer with fine tuning of rates and limits of queue execution","homepage":"https://github.com/energizer91/smart-request-balancer#readme","keywords":["request","rate","limit","balancer","queue","typescript"],"repository":{"type":"git","url":"git+https://github.com/energizer91/smart-request-balancer.git"},"author":{"name":"energizer91"},"bugs":{"url":"https://github.com/energizer91/smart-request-balancer/issues"},"license":"MIT","readme":"# Smart request balancer \n![npm](https://img.shields.io/npm/v/smart-request-balancer.svg)\n[![Node CI](https://github.com/energizer91/smart-request-balancer/actions/workflows/nodejs.yml/badge.svg)](https://github.com/energizer91/smart-request-balancer/actions/workflows/nodejs.yml)\n[![Coverage Status](https://coveralls.io/repos/github/energizer91/smart-request-balancer/badge.svg?branch=master)](https://coveralls.io/github/energizer91/smart-request-balancer?branch=master)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\nSmart request queue with fine tuning of rates and limits of queue execution\n\n## Installation\n### NPM\n```bash\nnpm install smart-request-balancer\n```\n### Yarn\n```bash\nyarn add smart-request-balancer\n```\n## Usage\n\n### CommonJS\n\n```js\nconst Queue = require('smart-request-balancer');\n```\n\n### Typescript\n\n```js\nimport Queue from 'smart-request-balancer';\n```\n\nImagine you have some telegram bot and you need to follow telegram rules of sending messages.\nYou have [this page](https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this) on Telegram bot API\nwhich says that your bot cannot send more than 1 message per second to person and not more 20 messages per minute\nto group/chat/channel. You can easily configure it in smart request balancer:\n```js\n\nconst queue = new Queue({\n  rules: {\n    telegramIndividual: { // Rule for sending private message via telegram API\n      rate: 1,            // one message\n      limit: 1,           // per second\n      priority: 1\n    },\n    telegramGroup: {      // Rule for sending group message via telegram API\n      rate: 20,           // 20 messages\n      limit: 60           // per minute\n    }\n  }\n});\n```\n\nAnd then just send this message easily:\n\n```js\nconst axios = require('axios');\n\nqueue.request((retry) => axios(config)\n  .then(response => response.data)\n  .catch(error => {\n    if (error.response.status === 429) { // We've got 429 - too many requests\n      return retry(error.response.data.parameters.retry_after) // usually 300 seconds\n    }\n    \n    throw error; // throw error further\n  }), user_id, 'telegramIndividual')\n  .then(response => console.log(response)) // our actual response\n  .catch(error => console.error(error));\n```\n\nHere you see that we are calling `queue.request()` with 3 parameters:\n- `fn` Request handler: promise which will be executed\n- `key` Unique key of request: For example, user_id of chat\n- `rule` Rule name: Rule which we configured at queue creation\n\nAlso you can see that we are handling retry in request handler. That's our plan B in\norder that Telegram API somehow gets requests overflow. Just call this retry function with some `Number`\nand this request will be fulfilled right after this time.\n\n## Queue API\n\n### Configuration\n```js\nconst queue = new Queue({\n  rules: {                     // Describing our rules by rule name\n    common: {                  // Common rule. Will be used if you won't provide rule argument\n      rate: 30,                // Allow to send 30 messages\n      limit: 1,                // per 1 second\n      priority: 1,             // Rule priority. The lower priority is, the higher chance that\n                               // this rule will execute faster \n    }\n  },\n  default: {                   // Default rules (if provided rule name is not found\n    rate: 30,\n    limit: 1\n  },\n  overall: {                   // Overall queue rates and limits\n    rate: 30,\n    limit: 1\n  },\n  retryTime: 300,              // Default retry time. Can be configured in retry fn\n  ignoreOverallOverheat: true  // Should we ignore overheat of queue itself\n})\n```\n\n### Making requests\nFor making requests you should provide callback which will have one argument called `retry` and should return promise\n```js\nconst key = user_id; // Some telegram user id\nconst rule = 'telegramIndividual'; // Our rule for sending messages to chats\nconst response = await queue.request((retry) => axios(config)\n  .then(response => response.data)\n  .catch(error => {\n    if (error.response.status === 429) { // We've got 429 - too many requests\n      return retry(error.response.data.parameters.retry_after) // usually 300 seconds\n    }\n    \n    throw error; // throw error further\n  }), key, rule);\n```\n\nYou can use any available promise-based library to make requests. Promise resolve will be transferred further.\n\n### Getting responses\n`queue.request(...)` will return promise which will resolve only when our queue will execute our request and get results.\nLet's extend our previous example:\n```js\ntry {\n  const response = await queue.request(requestHandler, key, rule); // our actual response\n} catch (e) {\n  console.error(e); // our request error (excluding 429)\n}\n```\n\n### Priorities\nEach rule has it's own priority. This was made to allow more urgent request execute faster than less urgent.\nImagine you have two rules: for individual messages and for broadcasting. Broadcasting can be a hard routine and\nyou should not totally wait for it to finish in order to send private message to somebody. In that case you should put\npriority 1 for private messages and priority 2 for broadcasting. In that case our queue will send broadcasting continuously\nbut as soon as it gets private message it will interrupt broadcasting, send message and continue.\n\n### Available methods\n\n- `request(handler: (retry: RetryFunction) => Promise, key: string, rule: string) => Promise` The main\nentrypoint for making requests with this library\n- `get totalLength(): number` - Getter for total length of queue\n- `get isOverheated(): boolean` - Getter for verifying is our queue is overheated\n\n### Getting retry error\n\nYou should use `retry` function in request in order to set retry for this request.\nYou can easily determine it by HTTP 429 code. Sometimes servers also return `retry_after` param which you can pass\nto `retry` function and set retry interval for this request. You don't need to do anything special. Our promise will only be resolved\nwhen server will respond us correctly.\n\n### Overall overheat\nSometimes you need to set overall overheat of queue (e.g. Telegram API has restriction to not send more than 30 messages per second overall).\nFor that purpose you can configure `overall` rule in config and set `ignoreOverallOverheat` to false.\n\n### Debug\nIn order to debug queue you can use environment variable `DEBUG=smart-request-balancer`.\n\n### Other usages\nYou can use this queue not only for API requests. This library can also be used for any routines which should be\nqueued and executed sequentially based on rules, grouping, priority and ability to retry.\n","readmeFilename":"README.md"}