{"_id":"@ambergristle/hono-rate-limiter","_rev":"9-881ea9a585fefe43575872dc3947e04e","name":"@ambergristle/hono-rate-limiter","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.1","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.1","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"26b471b347967eb352722e3c355cb29dc9e5117f","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.1.tgz","fileCount":2,"integrity":"sha512-rxM80UFE9gw7VlQgo4woZFnymMppC52spIRyqUQffD79pMcPjy9BN8Jnp/b5u1fuDO22Y6VExad51nsdLjr82Q==","signatures":[{"sig":"MEYCIQDMKmUUgTLH5cnkVnlFnqlffLADdXkIuB2daC2yvgk/AAIhALPKC8RSz5apzvE7A5nmYpYW3si5QL6t9yRLy2fCaWeE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5317},"main":"./dist/index.js","type":"module","module":"","engines":{},"exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"89120195b48c9c70a714604945131c06142e6c98","private":false,"scripts":{"test":"bun test ./src","build":"bun build --entrypoints ./src/index.ts ./src/algorithms/index.ts --outdir ./dist --target=node"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.1_1759547470470_0.12910440413274715","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.2","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.2","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"24de1a51d4d74ac72290e461bb63550db2ff5877","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.2.tgz","fileCount":2,"integrity":"sha512-0H7/9d9NoiNN5QRJ38pJ5svsflGib0FrOuol25rNc/ajkdP9su9OZvYjMolp6TZTFGgvN2L9C/kisTbx8klmNQ==","signatures":[{"sig":"MEYCIQDyqGwWlqps25uD5OtYw+O09MeAqK4QemiVhMtMR6lC1gIhAPaXBwnoZ2tt++qfIIZIk3qHWSWtFZcLYpY81fFNYkRK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5355},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"","engines":{},"exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"8f855661a3d688d85fe32efc8338bcc8e939b3ff","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.2_1759593201576_0.7877520982637962","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.3","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.3","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"0ec8aa7a327c56a76f35cd4c2976bc99b66d3381","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.3.tgz","fileCount":2,"integrity":"sha512-hLhZXNyqF0LmKT72CAskQ2rv4rTCcRMiggrqvP9HPeDMVUiys4GZrgunJM9rWbWzo7p67uKtYuf+XMRZ5Fa+Sw==","signatures":[{"sig":"MEUCIQDb5cZXfkmhCgijFR9Md5YIXDehMvcLv9SXrtgxnMckkwIgagM9RdtRbQvEbAFrpw7teIQhz3XbNUDaNq8Jk2hljQg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5370},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{},"exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"8f855661a3d688d85fe32efc8338bcc8e939b3ff","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.3_1759593312900_0.5117669842972474","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.4","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.4","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"7627a0a39104603de72ab2fd958c57d2515d4286","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.4.tgz","fileCount":2,"integrity":"sha512-c0Z6LUOnkhwXCx24eFkxBPO1Z/CS/mCwblFPemNOBJzvJ1W61u7NbLz74EfVIAwXzGHKbpehWBoJ2AH8Yo2HAg==","signatures":[{"sig":"MEQCIDty9+1/U4q+DMhuV0Tpf8t0aeOqnOTJPQ4zfcjSItExAiBtbCtO1EhandUs1uhYrFIfOtgsxZ8CnuVw9gaywXqG4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5370},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{},"exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"8f855661a3d688d85fe32efc8338bcc8e939b3ff","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.4_1759593515987_0.35058510566887646","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.5","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.5","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"3845858a29bd0444688c60bcb01b53bdf79195ed","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.5.tgz","fileCount":58,"integrity":"sha512-BWIMdALlOQeAvTzrXn38OHbQ4dThHrpwIdC7bE1MLLgav9MkiP74VeYEBM8edGXQZzBheqrqooQpp//jU39BuA==","signatures":[{"sig":"MEUCIQDQqTwGHjXmcec+JYFVha8t1XDqBhn7JStYLV0K89nwcQIgRLZTnu9a2ZdEK+mwzASGFxn6OykPvxSZ2SB1jocouE0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98861},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"8f855661a3d688d85fe32efc8338bcc8e939b3ff","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.5_1759593588366_0.8789695176724308","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.6","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.6","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"2b40ad570ea568623838014c7af249769e95e0b0","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.6.tgz","fileCount":18,"integrity":"sha512-2/uXVyZttDnKOCA1i0Q4JiEz795fcqdFv4fqSL47B5QEMfYHmbaPjJRhAT3zbJSawSktrj3fqFU6+Ze8ABD1qg==","signatures":[{"sig":"MEYCIQC8mcMlfqPsWyhG3VZWOTPdaW+PTK2NU1NxbL4/uTDMGAIhALB/HqPtWT1BqATS3xe2NEpBtdCv4RBG8lM1dMgULLdB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40508},"type":"module","types":"dist/types/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"8f855661a3d688d85fe32efc8338bcc8e939b3ff","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.6_1759593977316_0.014693175890911014","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.7","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.7","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"a1148e7d5f68c9a34ebb2faae865911000b9652d","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.7.tgz","fileCount":18,"integrity":"sha512-0I4nkY48W6DrzppLJROmgOCxJxD0i+TtHpNp1AbnWlwiyKfRC/3jVEMug7mxXeKVNbI9SBRwHajGoQ0HrMYg6A==","signatures":[{"sig":"MEUCIQDrj87/4YBPyT79DZUECheZCjKneLKD5+RKQAgGj+1q2AIgSmupazJdfJOnHoPy0b8/HCFGfVzPVJk6TI+Q32hLH60=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40545},"type":"module","types":"dist/types/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"34baba71fe85d44cdabeb7405956203329a460a9","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist","something":"npm pack --dry-run"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.7_1759594581367_0.534064053907439","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.8","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"author":{"name":"ambergristle"},"license":"MIT","_id":"@ambergristle/hono-rate-limiter@0.0.8","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"homepage":"https://github.com/ambergristle/hono-rate-limiter","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"dist":{"shasum":"920a314e67fce5b70a10e026fbbe4dc4c0ec877c","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.8.tgz","fileCount":18,"integrity":"sha512-SOfuCjIi+GVF674B3VwnZgoey5pi+lU3GCFPwMMj0m4nHb5THsT1JhjGSWpSfu2nNgBZMrfLO1OdIdYRvGr1dg==","signatures":[{"sig":"MEUCICUYs2DtGOOPWa123mUG5tC8N2vgePwD0N22Wrcv/l+zAiEAj5UnDQlQUCJviD3DGcRBzgs5LR8GjM1sdNydy2GuPZc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40565},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"funding":"https://github.com/sponsors/ambergristle","gitHead":"34baba71fe85d44cdabeb7405956203329a460a9","private":false,"scripts":{"test":"bun test ./src","build":"bun run --shell bun clean && bun ./build/index.ts","clean":"rm -rf dist","something":"npm pack --dry-run"},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"repository":{"url":"git+https://github.com/ambergristle/hono-rate-limiter.git","type":"git"},"_npmVersion":"10.9.2","description":"Basic rate limiting for Hono, featuring a variety of algorithms","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"devDependencies":{"hono":"^4.9.9","@types/bun":"^1.2.17","typescript":"^5.9.3","@upstash/redis":"^1.35.4"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"_npmOperationalInternal":{"tmp":"tmp/hono-rate-limiter_0.0.8_1759595190789_0.9109328693294472","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@ambergristle/hono-rate-limiter","version":"0.0.9","author":{"name":"ambergristle"},"repository":{"type":"git","url":"git+https://github.com/ambergristle/hono-rate-limiter.git"},"main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","devDependencies":{"@types/bun":"^1.2.17","@upstash/redis":"^1.35.4","hono":"^4.9.9","typescript":"^5.9.3"},"peerDependencies":{"hono":">= 4.7.4","@upstash/redis":">= 1.35"},"exports":{".":"./dist/index.js","./algorithms":"./dist/algorithms/index.js"},"description":"Basic rate limiting for Hono, featuring a variety of algorithms","funding":"https://github.com/sponsors/ambergristle","homepage":"https://github.com/ambergristle/hono-rate-limiter","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"license":"MIT","private":false,"scripts":{"clean":"rm -rf dist","build":"bun run --shell bun clean && bun ./build/index.ts","something":"npm pack --dry-run","test":"bun test ./src"},"type":"module","_id":"@ambergristle/hono-rate-limiter@0.0.9","gitHead":"34baba71fe85d44cdabeb7405956203329a460a9","bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-POcTUmOyWJOF7VG9jT2LwwW9jczRuQLyibq07uUUosCE8OyMygqf4brp2vxylGSATrWnexHJ7ialMMuTGMxoOg==","shasum":"0b8fb5a9fbd1d2e5767d412e8aadc8c33336b7f8","tarball":"https://registry.npmjs.org/@ambergristle/hono-rate-limiter/-/hono-rate-limiter-0.0.9.tgz","fileCount":18,"unpackedSize":40626,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCi7fXtnU7LupSJC08BdAnZvDL/yPi27ITLwuVlkLEJoAIgLPmpLYO1rHWoeOcOmMMvEdIleiIhvYBd8qFMcLA2be0="}]},"_npmUser":{"name":"ambergristle","email":"aspanos@protonmail.com"},"directories":{},"maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hono-rate-limiter_0.0.9_1759595900810_0.9232062004528012"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-04T03:11:10.338Z","modified":"2025-10-04T16:38:21.182Z","0.0.1":"2025-10-04T03:11:10.674Z","0.0.2":"2025-10-04T15:53:21.823Z","0.0.3":"2025-10-04T15:55:13.124Z","0.0.4":"2025-10-04T15:58:36.189Z","0.0.5":"2025-10-04T15:59:48.565Z","0.0.6":"2025-10-04T16:06:17.513Z","0.0.7":"2025-10-04T16:16:21.557Z","0.0.8":"2025-10-04T16:26:30.973Z","0.0.9":"2025-10-04T16:38:20.993Z"},"bugs":{"url":"https://github.com/ambergristle/hono-rate-limiter/issues"},"author":{"name":"ambergristle"},"license":"MIT","homepage":"https://github.com/ambergristle/hono-rate-limiter","keywords":["hono","rate","limit","ratelimit","rate-limit","middleware","ip","fixed-window","sliding-window","token-bucket","auth","authorization","security","brute","force","bruteforce","brute-force","attack"],"repository":{"type":"git","url":"git+https://github.com/ambergristle/hono-rate-limiter.git"},"description":"Basic rate limiting for Hono, featuring a variety of algorithms","maintainers":[{"name":"ambergristle","email":"aspanos@protonmail.com"}],"readme":"\n## TL;DR\n\nA flexible rate limiting solution designed for Hono + (Upstash) Redis (for now), with four built-in algorithms.\n\nModularity and interoperability are key goals. The `RateLimiter` can be used without the middleware, if you prefer to configure request handling yourself. I'll extend support to [`node-redis`](https://github.com/redis/node-redis) soon, and I'll look into implementing the algorithms using Cloudflare KV.\n\nThe middleware was inspired by [`hono-rate-limiter`](https://github.com/rhinobase/hono-rate-limiter), and the algorithms are borrowed from [`@upstash/ratelimit-js](github.com/upstash/ratelimit-js) and [Lucia Auth](https://lucia-auth.com/rate-limit/token-bucket).\n\n## Get Started\n\n```typescript\nimport { Redis } from '@upstash/redis';\nimport { rateLimiter } from '@ambergristle/hono-rate-limiter';\nimport { FixedWindowCounter } from '@ambergristle/hono-rate-limiter/algorithms';\n\nconst globalGetLimiter = rateLimiter({\n  client: Redis.fromEnv(), // don't forget to set env variables!\n  algorithm: FixedWindowCounter.init(100, 60),\n  cost: (c) => c.req.method === 'GET' ? 1 : 3,\n  generateKey: (c) => getConnInfo(c).remote.address,\n});\n\nconst app = new Hono()\n  .use('*', globalGetLimiter)\n  .get('/', (c) => c.text('Rate limited!'));\n\nexport default app;\n```\n\n### Generate identifiers from Context variables\n\n```typescript\ntype AuthEnv = {\n  Variables: {\n    user: { userId: string };\n  }\n}\n\nconst userLimiter = rateLimiter<AuthEnv>({\n  // ...\n  generateKey: (c) => c.var.user.userId,\n});\n\n\n```\n\n### Initialize limiter from Context\n\n```typescript\ntype RedisEnv = {\n  Variables: {\n    client: Redis;\n  }\n}\n\nrateLimiter<RedisEnv>({\n  client: (c) => c.var.client,\n  // ...\n});\n```\n\n### Make sure cache is persisted beyond requests\n\n```typescript\nconst blockedCache = new Map<string, number>();\n\nrateLimiter<RedisEnv>({\n  // ...\n  blockedCache,\n});\n```\n\n### Configure response Headers and error Response\n\n```typescript\nrateLimiter<RedisEnv>({\n  // ...\n  headerSpec: 'draft-7', // 'draft-6' | 'draft-7' | 'draft-8'\n  refundFailedRequests: true,\n  errorResponse: (c) => {\n    return c.text('Slow down!', 420);\n  }\n});\n```\n\n### Customize key prefixing\n\n`{keyPrefix?}:{policyName}:{key}`\n\n```typescript\nrateLimiter<RedisEnv>({\n  // ...\n  keyPrefix: 'limit',\n  policyName: 'global',\n});\n```\n\n## Roadmap\n\n#### improve tests, benchmarks\n- optimize test design to provide better coverage, use fewer resrouces\n- add coverage for algorithm-specific behaviors\n- add coverage/benchmarks for limiter performance\n\n#### reset all\n- should be able to clear redis policy-prefixed records\n- should this exist at the `RateLimiter` level?\n\n#### improve errors\n- distinguish between different error types?\n\n### open questions\n- how should request cost be communicated to clients\n  - is it factored into \n\n### Future\n\n#### deny list\n- allow identifiers? to be blacklisted\n- use a reference list as a starting point?\n\n#### safe load scripts\n- look into prehashing scripts, should be ez\n- add preloading for less-likely scripts, try to load if not found\n\n#### dynamic cost window log\n- doesn't obviously make sense, poses some serious technical challenges\n\n#### dynamic refunds\n- only required if limiter is untethered from middleware\n\n## tests\n\n[x] headers\n\n[x] cache\n\nmiddleware\n  [] configuration (validate required arguments and outputs)\n  [] headers\n  [] error response\n\nalgorithms\n  [x] configuration (validate required arguments and outputs)\n  [x] basic\n    [x] returns rate limit info and limiter result'\n    [x] blocks after limit exceeded\n    [x] allows additional requests after reset\n    [x] works consistently (this is a weak test)\n    [x] rejects all requests if max=0\n  [] specific\n    [] fixed doubled at boundaries\n    [] sliding smooth at boundaries\n    [] log exact\n    [] bucket? burst and rate\n  [x] check: check method returns current rate limit info\n  [x] refund: refund method restores quota units\n  [x] reset: reset method deletes identifier bucket\n\n  performance\n    [] response time\n    [] resource use\n  - concurrent requests\n  - multiple users (limits isolated per id)\n  - configurable windows","readmeFilename":"README.md"}