{"_id":"@bbc/http-transport-rate-limiter","_rev":"132-eeb9268eafd343f6d5a40eaacf75ca77","name":"@bbc/http-transport-rate-limiter","dist-tags":{"latest":"1.0.3"},"versions":{"0.0.1":{"name":"@bbc/http-transport-rate-limiter","version":"0.0.1","author":{"name":"ibl-team@lists.forge.bbc.co.uk"},"license":"Apache-2.0","_id":"@bbc/http-transport-rate-limiter@0.0.1","maintainers":[{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"}],"homepage":"https://github.com/bbc/http-transport-rate-limiter","bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"dist":{"shasum":"3e66c659f34f955de1c1127ccdd63ea13c90a1c5","tarball":"https://registry.npmjs.org/@bbc/http-transport-rate-limiter/-/http-transport-rate-limiter-0.0.1.tgz","integrity":"sha512-DWlsbT0KkNvfCVLuYoMbwU3ajfGFaoOf4Dn/+PvLm7rGzugZU87oLpEVY0g7ll7cd73izSpgKkDxRZjQXsIx/w==","signatures":[{"sig":"MEQCIEyKP+SkSYPv510U7LgTO1enc2+YMmrJ5O9xkP6cxN4mAiAZDLyleTo8ut891QWViWSgZrfqTLzR3/rxTHRAwF0Rig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"3e66c659f34f955de1c1127ccdd63ea13c90a1c5","engines":{"node":">=4.0.0"},"gitHead":"afbfed65efc2e259c8d919e03881f2730bc4ed8e","scripts":{"lint":"eslint .","test":"mocha","coverage":"istanbul cover _mocha -- -R dot"},"_npmUser":{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},"repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"_npmVersion":"2.14.12","description":"A global plugin for http-transport to utilise the simple-rate-limiter","directories":{},"_nodeVersion":"4.2.4","dependencies":{"simple-rate-limiter":"^0.2.3"},"eslintConfig":{"extends":"iplayer-es6"},"devDependencies":{"mocha":"^2.1.0","sinon":"^3.2.1","eslint":"^2.4.0","istanbul":"^0.4.1","simple-rate-limiter":"^0.2.3","eslint-config-iplayer-es6":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/http-transport-rate-limiter-0.0.1.tgz_1504618167206_0.3810399486683309","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@bbc/http-transport-rate-limiter","version":"1.0.0","author":{"name":"ibl-team@lists.forge.bbc.co.uk"},"license":"Apache-2.0","_id":"@bbc/http-transport-rate-limiter@1.0.0","maintainers":[{"name":"hjerling","email":"johan.hjerling.ext@bbc.co.uk"},{"name":"jontyusborne","email":"jonty.usborne@bbc.co.uk"},{"name":"nspragg","email":"nick.spragg@bbc.co.uk"},{"name":"zya","email":"ehsan.ziya@gmail.com"},{"name":"cejast","email":"cem.staveley@bbc.co.uk"},{"name":"niklasr","email":"nik.rahmel@bbc.co.uk"},{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"}],"homepage":"https://github.com/bbc/http-transport-rate-limiter","bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"dist":{"shasum":"929649253049834aa492687226ac6cdee08995c8","tarball":"https://registry.npmjs.org/@bbc/http-transport-rate-limiter/-/http-transport-rate-limiter-1.0.0.tgz","integrity":"sha512-hhLWjOBH1Kt8WHILCPqfj6mgZyMau4RvEu+x7EDfh0utQc3aFZOAIlu3lNPEnOkfrDx5uVIvVMB2ZVYfNgsLPA==","signatures":[{"sig":"MEYCIQCMufF/B8oSN14ZYZrYXoDNl3BaT/mRHPEhZlQ2QOp9NAIhAM1Af+jbPPGNvbxgcAA704i8hrwa8fzM/GHP0+eMzsX1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","engines":{"node":">=6.0.0"},"gitHead":"d6cf5e672ebb0ec3a7517ea5b6c0b35191e46c3f","scripts":{"lint":"eslint .","test":"mocha","coverage":"istanbul cover _mocha -- -R dot"},"_npmUser":{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},"repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"_npmVersion":"5.4.2","description":"A global plugin for http-transport to utilise the simple-rate-limiter","directories":{},"_nodeVersion":"8.6.0","dependencies":{"simple-rate-limiter":"^0.2.3"},"eslintConfig":{"extends":"iplayer-es6"},"devDependencies":{"mocha":"^2.1.0","sinon":"^3.2.1","eslint":"^2.4.0","istanbul":"^0.4.1","simple-rate-limiter":"^0.2.3","eslint-config-iplayer-es6":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/http-transport-rate-limiter-1.0.0.tgz_1511273279941_0.9029343405272812","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@bbc/http-transport-rate-limiter","version":"1.0.1","license":"Apache-2.0","_id":"@bbc/http-transport-rate-limiter@1.0.1","maintainers":[{"name":"hjerling","email":"johan.hjerling.ext@bbc.co.uk"},{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},{"name":"jsonl","email":"jason.luong@bbc.co.uk"},{"name":"niklasr","email":"nik.rahmel@bbc.co.uk"},{"name":"nspragg","email":"nick.spragg@bbc.co.uk"},{"name":"zya","email":"ehsan.ziya@gmail.com"}],"homepage":"https://github.com/bbc/http-transport-rate-limiter","bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"dist":{"shasum":"4fa36bdfa5e4c60285d5da7120de756bbcdd2128","tarball":"https://registry.npmjs.org/@bbc/http-transport-rate-limiter/-/http-transport-rate-limiter-1.0.1.tgz","fileCount":10,"integrity":"sha512-rOJQTT2Tgvii8W3vjgN66HDLykFbK1zp3oHojZEL93MrDryChOjEwSvr7WRX2vUpxspgyZ0pmXelbfEIJRQAmA==","signatures":[{"sig":"MEUCIQCqMgOMOLo+eokXaYxIsoZQLReP4UKtwDsWEPAK64D6fQIgdX/6s/U4w/Qi9vNUUlePRjqZkN5TGUlmuOWhdAXBsoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWFr8CRA9TVsSAnZWagAAhJIP/RnU5rlL/6zwkLuZGXP3\nhC+JqqFwrcC8uBzSRoZ2akrs0H++Dtadwufp8wvDwfZj3HGytUAB4YVzVhiR\nolgS6Vg74hYjbbFUD9fd8g5CnrSlyR/odCefvzlnHLOWfnAfl134EL4K96Z+\nSuZxopMDsZVcIzcPU5nUNkMmQhM4pmtKg7/mYMmeWc0UG4p0867ahNz1BZYq\n1mE9KqMc7FISMM7A61kGszMtZPnocdLM4yVRWAVaL54QKFNWi1dJqI4BWVO6\nABHiYhNoY8qK2QjaKIK9yuiO+mG3p9ON50QTFLeBjFhi+WoYinPNcWvDWI6t\nBd7sYxTR+Va7Hazl1M4z9ml/+/gLoMATgNFgZyjSY0hE3iA9ql8GU0u/FFsB\nGVMLUy3nS1NS/tCPio0NqQobnI1EzOxR5NnJXhE67CDD4xh98xLGChNJJ4f9\ntsYlY9BJ7ibfhbrUer6a+Vqz62/fL+dLKwvOtZB1xQFFkIydrDLqbHY78kjk\nJrQU7EjOnqOcTC12ZMUUn1x3fq0abx45D1lvgk07Zwv2L477yZ0qpYYcAZop\ngRboAkSiobgMGvtYNEnqraiKUWUbB35hy7ftrsSMP8ssefh1OFQo+ArPf4ax\nM0IOGRqJj7qgIu0NCV1xH87n93B5fxjRd4fFeIhVzhnp1XOaCen2ntelJHuS\n+uLZ\r\n=zijQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=8.0.0"},"gitHead":"81c728eb18f70a93d002e98233624b23d44e2672","scripts":{"lint":"eslint .","test":"mocha","coverage":"istanbul cover _mocha -- -R dot"},"_npmUser":{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},"repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"_npmVersion":"6.5.0","description":"A global plugin for http-transport to utilise the simple-rate-limiter","directories":{},"_nodeVersion":"8.7.0","dependencies":{"simple-rate-limiter":"^0.2.3"},"eslintConfig":{"extends":"iplayer-es6"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","sinon":"^7.2.3","eslint":"^2.4.0","istanbul":"^0.4.1","simple-rate-limiter":"^0.2.3","eslint-config-iplayer-es6":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/http-transport-rate-limiter_1.0.1_1549294332160_0.9111044908909243","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@bbc/http-transport-rate-limiter","version":"1.0.2","license":"Apache-2.0","_id":"@bbc/http-transport-rate-limiter@1.0.2","maintainers":[{"name":"kieranjoyce","email":"kieran.joyce99@gmail.com"},{"name":"monsai","email":"simone.spaccarotella@bbc.co.uk"},{"name":"rosemcnally","email":"rose.mcnally@bbc.co.uk"},{"name":"felixmercermoss","email":"felix.mercermoss@bbc.co.uk"},{"name":"katyasa","email":"Katya.Saint-Amand@bbc.co.uk"},{"name":"dwalker487","email":"Duncan.Walker02@bbc.co.uk"},{"name":"amitsavant","email":"amit.savant@bbc.co.uk"},{"name":"remotecharms","email":"emma.crothers@bbc.co.uk"},{"name":"npmbs","email":"ben.symons@bbc.co.uk"},{"name":"vaughr03","email":"richard.e.vaughan@bbc.co.uk"},{"name":"iuketaylor","email":"lqketaylor@gmail.com"},{"name":"jamiebower185","email":"jamie.reidbower@bbc.co.uk"},{"name":"benjwheeler","email":"ben.wheeler.ext@bbc.co.uk"},{"name":"onlyonehas","email":"hassanabbas93@hotmail.com"},{"name":"drrobharper","email":"rob.harper@bbc.co.uk"},{"name":"johnnewman","email":"john.newman@bbc.co.uk"},{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},{"name":"simontanner","email":"simon.tanner01@bbc.co.uk"},{"name":"simongregory","email":"simon.gregory@bbc.co.uk"},{"name":"tonymcbeth","email":"tony.mcbeth@bbc.co.uk"}],"homepage":"https://github.com/bbc/http-transport-rate-limiter","bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"dist":{"shasum":"d2a134fcd212aec81523ddc0fa78cd333e5eb8e7","tarball":"https://registry.npmjs.org/@bbc/http-transport-rate-limiter/-/http-transport-rate-limiter-1.0.2.tgz","fileCount":8,"integrity":"sha512-n8FNVvjnh4sp/lqzvatw6bw8m+8ZbNBtzE/k4WaHGmYEGdLjeAv7rIO7JKFm7+FOsSyNw4TiLeGMsG7SLJAWLw==","signatures":[{"sig":"MEUCIQCw/QoIfiHyAUHcwdPGEoe085ya6WKm34Yla7gnCrnSHQIgCwyAUB14EvLEZfQYvz9k75JpBYLNGf30d7uyRM5OrVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5369},"main":"index.js","engines":{"node":">=8.0.0"},"gitHead":"f0128dffb9762402ecacaf4dce64770762d4d0ee","scripts":{"lint":"eslint .","test":"mocha","posttest":"npm run lint"},"_npmUser":{"name":"jamiebower185","email":"jamie.reidbower@bbc.co.uk"},"repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"_npmVersion":"9.6.7","description":"A global plugin for http-transport to utilise the simple-rate-limiter","directories":{},"_nodeVersion":"18.17.0","dependencies":{"simple-rate-limiter":"^0.2.3"},"eslintConfig":{"extends":"iplayer-es6"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","sinon":"^7.2.3","eslint":"^4.18.2","@bbc/http-transport":"^4.3.0","simple-rate-limiter":"^0.2.3","eslint-config-iplayer-es6":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/http-transport-rate-limiter_1.0.2_1695983500365_0.9075173931519496","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@bbc/http-transport-rate-limiter","version":"1.0.3","license":"Apache-2.0","_id":"@bbc/http-transport-rate-limiter@1.0.3","maintainers":[{"name":"kieranjoyce","email":"kieran.joyce99@gmail.com"},{"name":"monsai","email":"simone.spaccarotella@bbc.co.uk"},{"name":"rosemcnally","email":"rose.mcnally@bbc.co.uk"},{"name":"felixmercermoss","email":"felix.mercermoss@bbc.co.uk"},{"name":"katyasa","email":"Katya.Saint-Amand@bbc.co.uk"},{"name":"dwalker487","email":"Duncan.Walker02@bbc.co.uk"},{"name":"amitsavant","email":"amit.savant@bbc.co.uk"},{"name":"remotecharms","email":"emma.crothers@bbc.co.uk"},{"name":"npmbs","email":"ben.symons@bbc.co.uk"},{"name":"vaughr03","email":"richard.e.vaughan@bbc.co.uk"},{"name":"iuketaylor","email":"lqketaylor@gmail.com"},{"name":"jamiebower185","email":"jamie.reidbower@bbc.co.uk"},{"name":"benjwheeler","email":"ben.wheeler.ext@bbc.co.uk"},{"name":"onlyonehas","email":"hassanabbas93@hotmail.com"},{"name":"drrobharper","email":"rob.harper@bbc.co.uk"},{"name":"johnnewman","email":"john.newman@bbc.co.uk"},{"name":"ibl","email":"ibl-team@lists.forge.bbc.co.uk"},{"name":"simontanner","email":"simon.tanner01@bbc.co.uk"},{"name":"simongregory","email":"simon.gregory@bbc.co.uk"},{"name":"tonymcbeth","email":"tony.mcbeth@bbc.co.uk"}],"homepage":"https://github.com/bbc/http-transport-rate-limiter","bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"dist":{"shasum":"bd4074087729512492731bdd3779ef030ee750ca","tarball":"https://registry.npmjs.org/@bbc/http-transport-rate-limiter/-/http-transport-rate-limiter-1.0.3.tgz","fileCount":8,"integrity":"sha512-KLSSzQ0AaAvG3Cl+gNOMvmf4evi/cH+L3Ue+tWX54qCuogo/BEHxS8RsRVSUvB9fx+IzKD2eph7Hq2HxPW4FpQ==","signatures":[{"sig":"MEQCIHUAgIMVwQmGsdzXgXqSlBn85qECIrjjqPJrnm84W3kDAiA0DFBmSPIB/YEQH3v5hOOuW8na4P4ZwDzkUh+eQzBOyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5433},"main":"index.js","engines":{"node":">=8.0.0"},"gitHead":"8a095068e28462298e55ed36a31528bf90da9918","scripts":{"lint":"eslint .","test":"mocha","posttest":"npm run lint"},"_npmUser":{"name":"jamiebower185","email":"jamie.reidbower@bbc.co.uk"},"repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"_npmVersion":"9.6.7","description":"A global plugin for http-transport to utilise the simple-rate-limiter","directories":{},"_nodeVersion":"18.17.0","dependencies":{"simple-rate-limiter":"^0.2.3"},"eslintConfig":{"extends":"iplayer-es6"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","sinon":"^7.2.3","eslint":"^4.18.2","@bbc/http-transport":"^4.3.0","simple-rate-limiter":"^0.2.3","eslint-config-iplayer-es6":"^1.3.0"},"peerDependencies":{"@bbc/http-transport":"^3 ^4"},"_npmOperationalInternal":{"tmp":"tmp/http-transport-rate-limiter_1.0.3_1695999521408_0.1465173232496415","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-09-05T13:29:28.199Z","modified":"2026-10-02T07:03:47.613Z","0.0.1":"2017-09-05T13:29:28.199Z","1.0.0":"2017-11-21T14:08:00.115Z","1.0.1":"2019-02-04T15:32:12.269Z","1.0.2":"2023-09-29T10:31:40.598Z","1.0.3":"2023-09-29T14:58:41.640Z"},"bugs":{"url":"https://github.com/bbc/http-transport-rate-limiter/issues"},"license":"Apache-2.0","homepage":"https://github.com/bbc/http-transport-rate-limiter","repository":{"url":"git+https://github.com/bbc/http-transport-rate-limiter.git","type":"git"},"description":"A global plugin for http-transport to utilise the simple-rate-limiter","maintainers":[{"email":"IBLMachineUser@bbc.co.uk","name":"ibl"},{"email":"kieran.joyce99@gmail.com","name":"kieranjoyce"},{"email":"tom.szpytman.ext@bbc.co.uk","name":"szpytfire-bbc"},{"email":"simon.tanner01@bbc.co.uk","name":"simontanner"},{"email":"simon.gregory@bbc.co.uk","name":"simongregory"},{"email":"tony.mcbeth@bbc.co.uk","name":"tonymcbeth"},{"email":"john.newman@bbc.co.uk","name":"johnnewman"},{"email":"jamie.reidbower@bbc.co.uk","name":"jamiebower185"},{"email":"hassanabbas93@hotmail.com","name":"onlyonehas"},{"email":"beth@gingertonic.io","name":"gingertonicst"},{"email":"lqketaylor@gmail.com","name":"iuketaylor"},{"email":"notten.dev13@gmail.com","name":"notten13"},{"email":"ben.symons@bbc.co.uk","name":"npmbs"},{"email":"kaifahmed+npm@gmail.com","name":"brotherkaif"},{"email":"patrick.shaw@bbc.co.uk","name":"pshaw03"},{"email":"amit.savant@bbc.co.uk","name":"amitsavant"},{"email":"eden.obrienbutcher@gmail.com","name":"eobr"},{"email":"paul.brimicombe@bbc.co.uk","name":"paulyb"},{"email":"charles.jewell47@gmail.com","name":"cjewell47"},{"email":"vinod.rane@bbc.co.uk","name":"vinodrane"},{"email":"sam.bason@bbc.co.uk","name":"sbason"},{"email":"alex.edwards@bbc.co.uk","name":"lexedwardsbbc"},{"email":"Duncan.Walker02@bbc.co.uk","name":"dwalker487"},{"email":"Katya.Saint-Amand@bbc.co.uk","name":"katyasa"},{"email":"felix.mercermoss@bbc.co.uk","name":"felixmercermoss"},{"email":"nikita.agarwal@bbc.co.uk","name":"nikitaagg19"},{"email":"matt.frost@bbc.co.uk","name":"mattfrost86"},{"email":"marinos.papamichael.ext@bbc.co.uk","name":"marinos-papamichael"},{"email":"joe.jackson@bbc.co.uk","name":"joepock33c"},{"email":"georgia.vente@bbc.co.uk","name":"giavente"},{"email":"rob.harper@bbc.co.uk","name":"drrobharper"},{"email":"emmanuel.mathar@bbc.co.uk","name":"emathar"},{"email":"jackperry2187@gmail.com","name":"jackperry2187"},{"email":"james.kirk@bbc.co.uk","name":"jim-beeb"},{"email":"neil.copland@bbc.co.uk","name":"nbc-bbc"},{"email":"iRecs@bbc.co.uk","name":"irex-team"}],"readme":"[![NPM downloads](https://img.shields.io/npm/dm/@bbc/http-transport-rate-limiter.svg?style=flat)](https://npmjs.org/package/@bbc/http-transport-rate-limiter)\n[![Build Status](https://api.travis-ci.org/bbc/http-transport-rate-limiter.svg)](https://travis-ci.org/bbc/http-transport-rate-limiter) \n![npm](https://img.shields.io/npm/v/@bbc/http-transport-rate-limiter.svg)\n ![license](https://img.shields.io/badge/license-MIT-blue.svg) \n![github-issues](https://img.shields.io/github/issues/bbc/http-transport-rate-limiter.svg)\n![stars](https://img.shields.io/github/stars/bbc/http-transport-rate-limiter.svg)\n![forks](https://img.shields.io/github/forks/bbc/http-transport-rate-limiter.svg)\n\n# http-transport-rate-limiter\nA global plugin for http-transport to utilise the [simple-rate-limiter](https://github.com/xavi-/node-simple-rate-limiter).\n\n## Usage\n\nConfigure the plugin as shown below. You can then use it as a global plugin for http-transport.\n```js\nconst simpleRateLimiterPlugin = require('@bbc/http-transport-rate-limiter')(count, duration);\n```\n\nThe plugin takes two arguments:\n- `count`: The amount of calls that are allowed per time window\n- `duration`: The length of the time window to restrict calls within. In milliseconds.\n\n### Example\n\n```js\n'use strict';\n\nconst url = 'http://example.com/';\nconst simpleRateLimiterPlugin = require('@bbc/http-transport-rate-limiter');\n\nconst client = require('@bbc/http-transport').createBuilder()\n  .use(simpleRateLimiterPlugin(2, 1000)\n  .createClient();\n\nconst res = await client\n  .get(url)\n  .asResponse();\n \nif (res.statusCode === 200) {\n  console.log(res.body);\n}\n```\n\n","readmeFilename":"README.md"}