{"_id":"@canmertinyo/rate-limiter-core","_rev":"11-863ee3e6967fa449904f775390181ecd","name":"@canmertinyo/rate-limiter-core","dist-tags":{"latest":"2.1.9"},"versions":{"1.5.0":{"name":"@canmertinyo/rate-limiter-core","version":"1.5.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-core@1.5.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":"5b2b96430ccc01ff148fc9828be322248f82563c","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-1.5.0.tgz","fileCount":29,"integrity":"sha512-yP4sV4Y04hEjaAVMNYviQft64H6Q0vya5ZUWxadLS3rf1NkjjtHqBjGGfyh3UvOwLOtKxTRdpWPyXP0uY4k0vA==","signatures":[{"sig":"MEUCIQDb1UDd4WYZmdDP/NWQKhDBvJbgeJajeehGmMF3NLD1BQIgHnQyWeiC9NUESIzmacZjpTTACZkgailJucCQnvRk+Ik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14294},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_1.5.0_1732968638300_0.8909007836392395","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"2f138cea6c52ef5bb7e9b7b9feb6df1b29cc0ad2","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.0.0.tgz","fileCount":29,"integrity":"sha512-Q37VpOLq3LwfzEImUngshYs+wRKx10DrriufrfrIxQM4+NzCjqzVYF6bWfBtgPGW5xBi3zLETTK88Btthf1sGQ==","signatures":[{"sig":"MEYCIQCcx7fSH6+2uSsBzSyn2VP5B8jo5BBwxRe4HNxA9rtawwIhAP3xAXilRqpxmE1FZDev/hsdrbBcZl7f4/3KGzJLm9RU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14294},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.0.0_1732968840332_0.24574756345325355","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"e45bc1992e226003a61e2c834531cbbc33d20e16","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.0.tgz","fileCount":36,"integrity":"sha512-GIxC8ZvLLHuMsjWy+xl7wfDZm668ocRmXIRKA+P1iEl0yZErdj1Bp6bih5VIc3lOX/I2RchBBRe/4skze3ncGA==","signatures":[{"sig":"MEYCIQC8gFKMCE1gKp9SCHS+f/0xc0NbniRybUboJ5XUciBkLAIhALvh+t9Ry8VucCpFQtD5oOaJCt5ncDUVtcbGdJCCF+JB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21485},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.0_1732980930810_0.05161588531584416","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"5117252ae58c23a1f4917a03a82c1b5f808b6980","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.1.tgz","fileCount":37,"integrity":"sha512-GygeAfNzJRwHyjkpYxcqGkNSp0mKKbD7IeNUM1QbiqHVLRsQ6fSyzrp5EhsNzNnpzx+qXBmAvEFQKC8vnm+J4g==","signatures":[{"sig":"MEQCIDvtTRTl82rmFJxpLZq8vhSBEJKtE+SrwLWOiB6f+pKYAiALJegJL6hVavENS9FoHX7iwEZ6J03Hy7ZjlyVMMdNB9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25109},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.1_1733033546541_0.23363439535079356","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"011c810cb672ef0e58b3c3ee9222c4efe74a5151","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.2.tgz","fileCount":37,"integrity":"sha512-GPvktTl+whLqsAaT6VIkqxsJtK6z1wz1qPIx0SQhowxKf2rji7mr2X1SZx9eDvSmqjOuOlhFc9+HOlwgagCS5w==","signatures":[{"sig":"MEUCIQCtnrfre+vPkCDo7xRxfXhKgwR5so+I2kWeaZ1wnkJXnAIgHxc8VOmXZfXPdYUoo4lE8x/Sk8bvbqx3I5ZgqaENPPU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25109},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.2_1733033572531_0.517410894678964","host":"s3://npm-registry-packages"}},"2.1.3":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"f42fcf522b52ab4c019321a46c7f892118542055","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.3.tgz","fileCount":37,"integrity":"sha512-7SPEjnsUCtAv/2D4e2q0kPnD5XgQj2WNxNT9hNrt/hQgcgXKhnNJLTYNLeCAvmC7gBKDJPmAA10uDt6fumw/+w==","signatures":[{"sig":"MEYCIQCfN90sfi3ik1xDgm99Evedc4dYBw7WbpqRVYbaxsDNMQIhAPu7eCgy6mewLy54MSAYtQJL1UTkWDnvuXzpStOKk0t/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25109},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.3_1733117384552_0.7843735139048982","host":"s3://npm-registry-packages"}},"2.1.4":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"8d01a0b591a850aef88fe611fa593ccc980e782c","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.4.tgz","fileCount":37,"integrity":"sha512-PkaeMbDD8gAz4rdM1qYtbjeYyYu36D3m4+cJojcdN5w8h378JVS4XJpLDQtxze4X23z1p/d6Nhmaq9v1JKJIvA==","signatures":[{"sig":"MEQCIH5q1WssOrFwO2VJMkqWCWY2mRMrdlNELM66uVkbPG8/AiAIH4LPbnzWQooKNiOysrz77/UVj80Rztk6+BdiB7hdlA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27492},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.4_1733117484699_0.7609663667616888","host":"s3://npm-registry-packages"}},"2.1.5":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"c2a59f1853819878ec95e7ce9ebe720393ed4a3e","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.5.tgz","fileCount":37,"integrity":"sha512-QzBVtDNRWmAuRQXwNPs3z7IW+V8S7DjjtqOvV+DxwZk4C/ZEk1UfdlORg1vvzRfb3pbepjL1ZcAvst08svkDiA==","signatures":[{"sig":"MEUCIQDJLoHcetmewvFiUeGBNeCwcTQYgNDzoKhT9O//ZpyMXAIgGbqjw6QG5M/+LZPCZRYxrK0mUwGfpZKFG/81g301nEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27492},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.5_1733211421261_0.5155044188189188","host":"s3://npm-registry-packages"}},"2.1.6":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"fe6aa46e0d9f20956d0ee561a86a32ef26496915","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.6.tgz","fileCount":37,"integrity":"sha512-XwmZSzCSgPKj8JV6JE37H95P7LnVlekpPk7zpE63QFsiCetxGeUl6AJnQpx8YuZJMnyeLxdiYpU7TDauYxyfjA==","signatures":[{"sig":"MEQCIAqaMhHKAe+QUyZM+nwb56WaEapSkizFf6afzzm7DDFsAiBlxeiu8Oj3IjjEU7rw44OSRrmOuPeb7V4ZmTK/9Cib0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27492},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.6_1733213001922_0.9863911567421877","host":"s3://npm-registry-packages"}},"2.1.7":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"3f46ac9eff126416428765b09b4e1264569b19be","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.7.tgz","fileCount":37,"integrity":"sha512-iS99SLpFu1VIFiNVT89O9ExEiG3OQjv49HbYp6mSiLsdQDiIaqmUKiwBgHoSZGeHamQIta5oW6fp4X68CUzolg==","signatures":[{"sig":"MEUCIF8ETpMdiysEMf9Kdo/sy4MUVQDxAX7388OzcpnFEH17AiEA1SNHjmmai6aNPGqs/NIRszI9FaOWktxgdO9HaXEziOI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27492},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.7_1733213407046_0.43416832961715945","host":"s3://npm-registry-packages"}},"2.1.8":{"name":"@canmertinyo/rate-limiter-core","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-core@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":"cc82cc61f4eca119fbe97816c1bbc44a582e467b","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.8.tgz","fileCount":37,"integrity":"sha512-dxWQzxfqHdXunvKzjmsNYQIGfwlRaGzaX5PXYG08Px3mF90OE0yntS41WNvBG4ASyEW7AydYWa6w0sHbKHnsjw==","signatures":[{"sig":"MEQCIDwtb/ODVbyUFlSGNSwMPnblRPUzHupp0iGmS4H1UNOQAiBiQkWIHIFtlYlQpYifjolLk3DmAQhbVu09Ce53/fmB/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28391},"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","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rate-limiter-core_2.1.8_1733213926225_0.6188998405945323","host":"s3://npm-registry-packages"}},"2.1.9":{"name":"@canmertinyo/rate-limiter-core","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"},"publishConfig":{"access":"public"},"_id":"@canmertinyo/rate-limiter-core@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-5pOAVyx0kfSsCD2RcQuJv1Ut/zDE/+An+dHsOr8ruK0z6qXK1GNclhXXVDU/hrk7JE+ZwzlBEFSDdQVQXzywhQ==","shasum":"580793395f76b01830ef25d3584bbcc32816cfde","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-core/-/rate-limiter-core-2.1.9.tgz","fileCount":37,"unpackedSize":28541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMctPjNCe3uiraS+f18hAXAzuv0gt1i+15AxR1W5Ak8wIhAOSE7ikv3uxtu7e1qaY/LKO4uXUJwVgUYfShdLJ31/n6"}]},"_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-core_2.1.9_1733214528318_0.030580706437288496"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-30T12:10:38.201Z","modified":"2024-12-03T08:28:48.661Z","1.5.0":"2024-11-30T12:10:38.473Z","2.0.0":"2024-11-30T12:14:00.506Z","2.1.0":"2024-11-30T15:35:31.001Z","2.1.1":"2024-12-01T06:12:26.709Z","2.1.2":"2024-12-01T06:12:52.768Z","2.1.3":"2024-12-02T05:29:44.828Z","2.1.4":"2024-12-02T05:31:24.882Z","2.1.5":"2024-12-03T07:37:01.431Z","2.1.6":"2024-12-03T08:03:22.078Z","2.1.7":"2024-12-03T08:10:07.220Z","2.1.8":"2024-12-03T08:18:46.400Z","2.1.9":"2024-12-03T08:28:48.495Z"},"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"}