{"_id":"@canmertinyo/rate-limiter-redis","_rev":"10-0382adc60ad3bfb0d35fc7d240102f94","name":"@canmertinyo/rate-limiter-redis","dist-tags":{"latest":"2.1.9"},"versions":{"2.0.0":{"name":"@canmertinyo/rate-limiter-redis","version":"2.0.0","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.0.0","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"8995e78801943ca362916fed612a8529a5f8ff6d","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.0.0.tgz","fileCount":14,"integrity":"sha512-KAUwLF95k0eldJAhQyThINTMDzAimcBsflgBeU1tqy/qfOUvsvlV418a9nf0ZFTxO65Qew1ZGXHTHSJlTF1Gdw==","signatures":[{"sig":"MEUCIEbfMFqkoAJ9hXqb2gXoVSQTfZmUdJwfpTRUeD9ToVdtAiEA4YbPSLZcUr53Lm2CF8BsxcKSpAZ0meyKOhx2WzmPAbE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9403},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"22a9f801db876a325fd2265d8feee4efb0109481","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.0.0_1732968865834_0.017355450917728943","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.0","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.0","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"c43cb8587b59972a727a26bb551a0b720b338a02","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.0.tgz","fileCount":12,"integrity":"sha512-2SV6nr5p3ErSyaH62ffjcLVADggqfYwall0hRO7gUJ+hdQ3GYiZhRJlwYOmj5vibDycpLaGR9+mj4Aj+ThZ3Xg==","signatures":[{"sig":"MEYCIQCnjhf49J6zKes6L57JESy2HJyANX5Mx2Ifc75UhlfgcwIhANODWK3+z5FNLss/H9DXh3/130JNv++UXG2IfxD4O09g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8437},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f5e715a7d64a6b9862739faa03965ae10bc57b9c","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.0_1732980931054_0.1363306531633175","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.1","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.1","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"2e7d356e6aca029ae0b3e7cc7a3c411d1477fd1f","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.1.tgz","fileCount":13,"integrity":"sha512-GrgwwEzWHlm646TDyoskZWhOA2H/TclEZwrLlXACJe5yYsolY2xZHNOQyEVeV9i7GgItc2TCt80ty8Bc6RQ4kw==","signatures":[{"sig":"MEQCIC+6IsVcPEmXW/TFbsT8TKHQvZ6/FF7bkZOtgYiEXiI+AiBuVUoQe4blfd188iRw19r1xS5qKW4swZ+QccONlysEaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12061},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1d968a8dd739fc8729f9d3d6c7ea66d608f920f2","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.1_1733033546443_0.744286424988484","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.2","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.2","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"94a32693285deff19e14ce9b139b8d6f700389f9","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.2.tgz","fileCount":13,"integrity":"sha512-lJiIoS5CFni3Lc/2FhEj+RL9U/yhm5ME0AHuvNDndZRhXlG5jzR5z7PZ35qWPvYmovC68MSVal38Ajxk0qaOrg==","signatures":[{"sig":"MEYCIQDkTr8mjwpN50Ojyg9wNBvTesllVdAZTkw7Yjcn9xSZngIhAMGRKpFATyZnLb/+Mbd2B/WWf4ZJcq6EFeoyumgLuq9O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12061},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1d968a8dd739fc8729f9d3d6c7ea66d608f920f2","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.2_1733033571948_0.45700956599884335","host":"s3://npm-registry-packages"}},"2.1.3":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.3","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.3","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"3f0a891f3cd89363006984594758810dbde85ea8","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.3.tgz","fileCount":13,"integrity":"sha512-tD6pEsWgOsKl9AGiV+uzItl5uXAqAwzHzGUPH+b+g1/sS1lVLmi0TV1A1+JuJRjnJrw67l48ZoeSapBz7S3KWw==","signatures":[{"sig":"MEQCIBGJi7712sSQKaLu2RizkDPagHVLMzX3/AxEnlMoFyq4AiBu8CTc6x/ImftbHplyxecr4Vzb/cOw+7exjfropzOwOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12100},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"3a85e59055b8732b6936c0d393bfce6b2eeeb310","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.3_1733117384734_0.29756781181009595","host":"s3://npm-registry-packages"}},"2.1.4":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.4","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.4","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"383ae49c5de9ab5417862e10a2f13089cb8741a5","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.4.tgz","fileCount":13,"integrity":"sha512-/oT2Cw5cvtzGHQyrC8wQKSClYHkpxxjgmOjxXZDRvaOwWM7+w8M72NTTK9jgZn5wJYXW8/wGC00DVBttdokvHA==","signatures":[{"sig":"MEUCIQCZeN+kxvx9y6Ac+bmZGJ2yWg76D5V1tKV3XsedpMxIcAIga4n5CxV+P1YZ3wSNcEqlRGGb/nw0N4VBbGpCs7xCL74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14483},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"df0b17bfe3dfceb8a1bfb5d502b2427a8f733d48","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.4_1733117484954_0.6898282464736809","host":"s3://npm-registry-packages"}},"2.1.5":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.5","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.5","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"16db3d530f1d9295805cd0a62d36c2ffd31ae853","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.5.tgz","fileCount":13,"integrity":"sha512-mPfgKPD9XvAVD0X1q0aXXSeNVlRYGmi9Uzpt7LTuEoEcrT9WzSmoaJFrzoKZNqjAGfIf9a0jAFM6EX0ZRcEjjw==","signatures":[{"sig":"MEUCIQCPsu+IwnU8Yo87qNaVyjKNVifbQEK5hySjQWtWn9l/mgIgcJnyd9Kcdwg820YGMR488jsOzxThtuQYoAW5aDnaqpk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14483},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"72d0163e4d23b2dd822464f610b950f58e571fe4","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.5_1733211420853_0.5383007229751169","host":"s3://npm-registry-packages"}},"2.1.6":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.6","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.6","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"e65c490ab7d168e8aa22a094033afa1759281bdf","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.6.tgz","fileCount":13,"integrity":"sha512-VoZl9lcqL2n+2TCSDzCsiEcUKM0KTMd/3mtEx5KHiTqtZOuu9VxWH3KE2SGdyEBCbqRpiEVEvsGaxnnUlzdBEA==","signatures":[{"sig":"MEQCIFv2jD45OfNsJ0beqodev1deFuUKB/HILR0qLxSWWJJgAiBq2LFmpDPKTCSH4PR0n3lxsKSkzX3i3LGbfdJzyDieGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14483},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"72d0163e4d23b2dd822464f610b950f58e571fe4","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.6_1733213001542_0.6342005032254425","host":"s3://npm-registry-packages"}},"2.1.7":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.7","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.7","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"1e16e0e02ef83d21d418d22b886f496a8878c41d","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.7.tgz","fileCount":13,"integrity":"sha512-3W1NC3EJy1Ug8KHg3X3U2Qao5sMN3p40qr7n42IcN2ypf5z2bSTq/QLHDQ6828c8YMU1OOg6PzP3pz/Ax3v3lw==","signatures":[{"sig":"MEUCIHN0bGtzmETKabh48g4/faeiAb5KGTQHlrl7veqcv8VUAiEA5fxSDpA6DZxN2BhZTQ+R5UAICxEZ+wBjw6bHDrCsFhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14483},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"72d0163e4d23b2dd822464f610b950f58e571fe4","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.7_1733213406756_0.15852302081126113","host":"s3://npm-registry-packages"}},"2.1.8":{"name":"@canmertinyo/rate-limiter-redis","version":"2.1.8","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"license":"MIT","_id":"@canmertinyo/rate-limiter-redis@2.1.8","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"dist":{"shasum":"5438a93a4a33e12d98ba0252cb45add0e3e7d0d7","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.8.tgz","fileCount":13,"integrity":"sha512-avvrsh885D+G9gk/B6Wh/fpXKvL0zJHlKtJFQVaAF97BteDMBTjfzJgLt5MUtf13D6OVpemJ7ngchGJ/m3uqLQ==","signatures":[{"sig":"MEUCICG5EoSXBZwC1Q8WAnneOGQRp8SWPyPS2jONp+agloe2AiEA1HTeN0DpYKpag2OZY73LpoBSSARnfIpRC/hZCn+XkEQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15382},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7cb552657bac82c073159987b05422c6586ff384","scripts":{"build":"tsc","publish":"npm publish"},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"repository":{"url":"git+https://github.com/c4nzin/rate-limiter-express.git","type":"git"},"_npmVersion":"10.9.0","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-redis_2.1.8_1733213926128_0.9107757335387454","host":"s3://npm-registry-packages"}},"2.1.9":{"name":"@canmertinyo/rate-limiter-redis","description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","version":"2.1.9","main":"dist/index.js","license":"MIT","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/c4nzin/rate-limiter-express.git"},"scripts":{"build":"tsc","publish":"npm publish"},"keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"author":{"name":"c4nzin"},"devDependencies":{"@types/express":"^5.0.0","typescript":"^5.7.2"},"dependencies":{"@canmertinyo/rate-limiter-core":"^1.3.9"},"publishConfig":{"access":"public"},"_id":"@canmertinyo/rate-limiter-redis@2.1.9","gitHead":"57c3117e4ea16518f62429ef3e41a0628ef19258","bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"homepage":"https://github.com/c4nzin/rate-limiter-express#readme","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-dslaDatb33pqXVevbKxlLlN1QsGqgMIvdi0ljK9RUHHaeIdUmtrNo0qdyTTnhC/s6Uyh2fAiKafK3SmnIlaR3Q==","shasum":"1e34a5687a179ce8bdf9c6103264bd10699f280b","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-redis/-/rate-limiter-redis-2.1.9.tgz","fileCount":13,"unpackedSize":15532,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHU6S772mdLlh7u5x6pRRhzoTDZc8DP7hgi0Do1VeThwIgYmLphnBW27E2Uze+TUiBDbts/7OIUSBt7MMIjWj5UPo="}]},"_npmUser":{"name":"canmertinyo","email":"squalcan@gmail.com"},"directories":{},"maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rate-limiter-redis_2.1.9_1733214528096_0.345969083066773"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-30T12:14:25.729Z","modified":"2024-12-03T08:28:48.513Z","2.0.0":"2024-11-30T12:14:26.012Z","2.1.0":"2024-11-30T15:35:31.333Z","2.1.1":"2024-12-01T06:12:26.634Z","2.1.2":"2024-12-01T06:12:52.130Z","2.1.3":"2024-12-02T05:29:44.937Z","2.1.4":"2024-12-02T05:31:25.164Z","2.1.5":"2024-12-03T07:37:01.068Z","2.1.6":"2024-12-03T08:03:21.693Z","2.1.7":"2024-12-03T08:10:06.921Z","2.1.8":"2024-12-03T08:18:46.300Z","2.1.9":"2024-12-03T08:28:48.285Z"},"bugs":{"url":"https://github.com/c4nzin/rate-limiter-express/issues"},"author":{"name":"c4nzin"},"license":"MIT","homepage":"https://github.com/c4nzin/rate-limiter-express#readme","keywords":["rate-limiter","express","middleware","redis","mongodb","in-memory","rate-limit-express","api-rate-limiting","express-middleware","nodejs"],"repository":{"type":"git","url":"git+https://github.com/c4nzin/rate-limiter-express.git"},"description":"A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage","maintainers":[{"name":"canmertinyo","email":"squalcan@gmail.com"}],"readme":"# Express Rate Limiter\r\n\r\n### This set of packages provides flexible and highly customizable rate-limiting solutions for Node.js applications. The core package, @canmertinyo/rate-limiter-core, includes the in-memory implementation. To enable storage-backed rate limiting, you can integrate it with either @canmertinyo/rate-limiter-mongo for MongoDB, @canmertinyo/rate-limiter-redis for Redis, or @canmertinyo/rate-limiter-memcached for Memcached.\r\n\r\n## Rate Limiter Options\r\n\r\n| **Option**         | **Type**   | **Description**                                                                           | **Default Value**        | **Example**                                             |\r\n| ------------------ | ---------- | ----------------------------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------- |\r\n| `ms`               | `number`   | Time window in milliseconds for rate limiting.                                            | `60000` (1 minute)       | `ms: 60000`                                             |\r\n| `maxRequest`       | `number`   | Maximum requests allowed within the time window.                                          | `10`                     | `maxRequest: 10`                                        |\r\n| `storage`          | `object`   | Storage manager for rate limits (e.g., in-memory, MongoDB, Redis, Memcached).             | `undefined` (in-memory)  | `storage: mongoStorage`                                 |\r\n| `message`          | `string`   | Custom message returned when rate limit is exceeded.                                      | `\"Too many requests\"`    | `message: \"Too many requests, please try again later.\"` |\r\n| `statusCode`       | `number`   | HTTP status code for rate limit responses.                                                | `429`                    | `statusCode: 429`                                       |\r\n| `keyGenerator`     | `function` | Function to generate a unique key for rate limiting (e.g., based on `req.ip` or headers). | `(req) => req.ip`        | `keyGenerator: (req) => req.ip`                         |\r\n| `skip`             | `function` | Function to bypass rate limiting for certain requests (e.g., based on user role).         | `undefined`              | `skip: (req) => req.headers[\"x-user-role\"] === \"admin\"` |\r\n| `errorHandler`     | `function` | Error handling function for issues from the storage layer.                                | Logs error and proceeds. | `errorHandler: (req, res, next) => next()`              |\r\n| `passOnStoreError` | `boolean`  | Whether to allow requests to pass even if the storage fails.                              | `false`                  | `passOnStoreError: true`                                |\r\n\r\nTo install (Core version only in memory):\r\n\r\n```bash\r\nnpm install @canmertinyo/rate-limiter-core\r\n```\r\n\r\nTo install (Mongo store):\r\n\r\n```bash\r\nnpm install @canmertinyo/rate-limiter-mongo mongoose\r\n```\r\n\r\nTo install (Redis store)\r\n\r\n```bash\r\nnpm install @canmertinyo/rate-limiter-redis ioredis\r\n```\r\n\r\nTo install (Memcached store)\r\n\r\n```bash\r\nnpm install @canmertinyo/rate-limiter-memcached memcached\r\n```\r\n\r\n# Example usage :\r\n\r\n```typescript\r\nimport express from \"express\";\r\nimport { rateLimiter } from \"@canmertinyo/rate-limiter-core\";\r\n\r\nconst app = express();\r\n\r\n// Apply rate limiter middleware\r\napp.use(\r\n  rateLimiter({\r\n    ms: 60000, // Time in milliseconds\r\n    maxRequest: 5, // Maximum requests allowed within the time\r\n    //DEFAULT IS IN MEMORY\r\n  })\r\n);\r\n\r\napp.get(\"/\", (req, res) => {\r\n  res.send(\"Welcome to the API!\");\r\n});\r\n\r\napp.listen(3000, () => {\r\n  console.log(\"Server is running on http://localhost:3000\");\r\n});\r\n```\r\n\r\n# Using Redis As A Store Manager\r\n\r\n```typescript\r\nimport express from \"express\";\r\nimport { RedisStorage } from \"@canmertinyo/rate-limiter-redis\";\r\nimport { rateLimiter } from \"@canmertinyo/rate-limiter-core\";\r\n\r\nconst app = express();\r\nconst port = 3001;\r\n\r\n// Configure the rate limiter with Redis storage\r\napp.use(\r\n  rateLimiter({\r\n    ms: 5000, // Time window in milliseconds\r\n    maxRequest: 2, // Maximum requests allowed in the time window\r\n    storage: new RedisStorage({ host: \"127.0.0.1\", port: 6379 }), // Redis configuration\r\n  })\r\n);\r\n\r\n// Sample route\r\napp.get(\"/\", (req, res) => {\r\n  res.send(\"Hello World!\");\r\n});\r\n\r\n// Start the server\r\napp.listen(port, () => {\r\n  console.log(`Server listening on port ${port}`);\r\n});\r\n```\r\n\r\n# Using Mongo As A Store Manager\r\n\r\n```typescript\r\nimport express from \"express\";\r\nimport { MongoStorage } from \"@canmertinyo/rate-limiter-mongo\";\r\nimport { rateLimiter } from \"@canmertinyo/rate-limiter-core\";\r\n\r\nconst app = express();\r\nconst port = 3001;\r\n\r\n// MongoDB connection string (replace with your MongoDB URL)\r\nconst mongoUrl = \"mongodb://your-mongodb-url\";\r\n\r\napp.use(\r\n  rateLimiter({\r\n    ms: 5000, // Time window in milliseconds\r\n    maxRequest: 2, // Maximum requests allowed in the time window\r\n    storage: new MongoStorage(mongoUrl), // MongoDB configuration\r\n  })\r\n);\r\n\r\n// Sample route\r\napp.get(\"/\", (req, res) => {\r\n  res.send(\"Hello World!\");\r\n});\r\n\r\n// Start the server\r\napp.listen(port, () => {\r\n  console.log(`Server listening on port ${port}`);\r\n});\r\n```\r\n\r\n```typescript\r\napp.use(\r\n  rateLimiter({\r\n    ms: 60000, // Time window in milliseconds\r\n    maxRequest: 10, // Maximum requests allowed\r\n    storage: mongoStorage, // Use MongoDB or Redis as storage or just leave it as empty. it will behave in memory storage\r\n    message: \"Too many requests, please try again later.\", // Custom rate limit message\r\n    statusCode: 429, // OPTIONAL: You can fully optimize HTTP status code for rate limit response\r\n    keyGenerator: (req) => req.ip, //OPTIONAL :  Custom key generator\r\n    skip: (req) => {\r\n      //OPTIONAL :\r\n      const userRole = req.headers[\"x-user-role\"]; // Assume user role is passed in headers\r\n      return userRole === \"admin\"; // Skip rate limiting for admin users\r\n    },\r\n    errorHandler: (req, res, next) => {\r\n      console.error(\"Rate limiter error\");\r\n      next();\r\n    }, // Handle errors from storage\r\n    passOnStoreError: true, // Pass requests even if storage fails\r\n  })\r\n);\r\n```\r\n\r\n# Using memcached as a store manager\r\n\r\n```typescript\r\nimport express from \"express\";\r\nimport { MemcachedStore } from \"@canmertinyo/rate-limiter-memcached\";\r\nimport { rateLimiter } from \"@canmertinyo/rate-limiter-core\";\r\n\r\nconst app = express();\r\nconst port = 3001;\r\n\r\n// Configure the rate limiter with Memcached storage\r\napp.use(\r\n  rateLimiter({\r\n    ms: 5000, // Time window in milliseconds\r\n    maxRequest: 2, // Maximum requests allowed in the time window\r\n    storage: new MemcachedStore(\"127.0.0.1:11211\", { //optons for customize db behaivor }), // Memcached configuration\r\n  })\r\n);\r\n\r\n// Sample route\r\napp.get(\"/\", (req, res) => {\r\n  res.send(\"Hello World!\");\r\n});\r\n\r\n// Start the server\r\napp.listen(port, () => {\r\n  console.log(`Server listening on port ${port}`);\r\n});\r\n\r\n```\r\n","readmeFilename":"README.md"}