{"_id":"@canmertinyo/rate-limiter-mongo","_rev":"10-090d9a8a2677125d752b1695abf227c0","name":"@canmertinyo/rate-limiter-mongo","dist-tags":{"latest":"2.1.9"},"versions":{"2.0.0":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"b3d1c25e322fb5705ffa460f48e23203385c18ed","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.0.0.tgz","fileCount":11,"integrity":"sha512-in49Bs1qqoX1EQHKbHpcbyUFy4sceM8MfZuS41MP1g1ojQPxokzDhBIAiGmMi0cC8P8G8I/8tGaAOkqxlsAiZA==","signatures":[{"sig":"MEUCIQDjc438+mZTmDFuDzBhYoh0t3v4CL8CphEhwYjMs/xPtQIgaDVyhV81uUtjj83hcJMjrX4TmYKVVEYiOE2borKOszk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9058},"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-mongo_2.0.0_1732968858539_0.610592761722581","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"6ffd36ecc25eba81275bb9e8a470b0777e712c0c","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.0.tgz","fileCount":11,"integrity":"sha512-6DcorZcYr7Kz4ZQLe9P/JvklGtLilo9IcuDAreVKrr1KPUzihrOk8oq5HAkUbvs7OqyP7qsSxtYJLTortYxLuA==","signatures":[{"sig":"MEYCIQDqbA7nMTzcxjGFWbS+S4VB6TpaUSFYV/3CJeaofGSaXgIhANA/3QUuYPdDScB2O+FUMGxmcD5BctmqXRhrOZgzhpXP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10324},"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-mongo_2.1.0_1732980931557_0.958173524259577","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"ad4ff9e73906288a482eae9141e8dcc17a35f2b2","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.1.tgz","fileCount":12,"integrity":"sha512-1Oj/7/d43pHwakTs9P0YfaH8b/MrAglD23zX2lhGCGiPuZgR+1KcslPFAtTNqDGSwlhgqKXyN5nVHy8Us0rosw==","signatures":[{"sig":"MEUCIB/GWgou9AKn32RjOr0fih2JQarJRHfVgigRfj3M5ClzAiEA/buJUUB5I9H1GgXpggiSHkjVuZh9xzMgyKMS9GZSmig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13948},"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-mongo_2.1.1_1733033546091_0.5093860108860013","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"aa172175bd21842bd6cd4e011664d5624ee76d61","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.2.tgz","fileCount":12,"integrity":"sha512-1EOWmL00U3wKdMC34hW6iGhnBYvD9oltvS2N3fr3CUL5lFwl+29gMAmvyp9eUjPvU/JzX2yjD1J4SDH6hrhVaw==","signatures":[{"sig":"MEUCIAwKErEC1g25CP+nPBFMHBQxixt5bv2sngaOmhYMzCM6AiEAplbn7V68f9VjatfJtE/PTU8rq43ptrftiKZsvbsjJgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13948},"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-mongo_2.1.2_1733033572339_0.705130517248076","host":"s3://npm-registry-packages"}},"2.1.3":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"754737f54f3e609c4b1dd337ae0fa0926f36d638","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.3.tgz","fileCount":12,"integrity":"sha512-aOyNrnRWs3unqTz3HHgDNcmppDls1nWRwMoOqLkTPiF/kLHH21GEnTpqSJNC9tBIJOOKj04soC8rARL6uLRphw==","signatures":[{"sig":"MEQCIAGS0+HehNCStJ3ZB2XxXRT0aEVsgYlbXIGyc2ITa/jmAiAg+wF2bocktiX94HdaeNT9TyjPryQdC52K4EE5PZ/9mg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16370},"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-mongo_2.1.3_1733117384613_0.7576812273575402","host":"s3://npm-registry-packages"}},"2.1.4":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"68d5a7481730c84c6879c9fc6d3e5746e6bae713","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.4.tgz","fileCount":12,"integrity":"sha512-hGqZLA8xoTZ1igFrAR8RlEH9uOFOmE8JGayFWlFRItpHIQ3xjkN/hSGzWty7U1k3xnzNTkroEKOL+DoqK5Yacw==","signatures":[{"sig":"MEUCIQCHiCegrQc7o1cz7j0mR2DJPq7SiJbwhREb+4AtDKqK7AIgRdDnlubEBbaq4Lxszmotstzu40LLJMTkFOQl7Qu98mo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16370},"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-mongo_2.1.4_1733117484403_0.7602379494176374","host":"s3://npm-registry-packages"}},"2.1.5":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"2e1cc28e66969e57ad17176aaec226d0481e18d4","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.5.tgz","fileCount":12,"integrity":"sha512-a04WZXkobA6krPbyKR8JHMIzA6jFhllZ00Z/ZXz+5gU+iDUKrZOcmnJ95b8Afdqo3Uo0jli9rUnrTFi/LbJThw==","signatures":[{"sig":"MEYCIQChD2F7+jJIAeG6lPNXwucJca7BdAkOdk7wJ7ggaqTQVQIhANkBqQaDj1N+umKb4ltkMpVxfOV3GoKEUS9afmKk+iss","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16377},"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-mongo_2.1.5_1733211421071_0.6742406283579523","host":"s3://npm-registry-packages"}},"2.1.6":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"529dbb125ae527ec262548dfc5da61b660d7a7b2","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.6.tgz","fileCount":12,"integrity":"sha512-Trhq9I98LQWwUeB5QV8sCsjXBESt2KKZ9wePf018ITbtnfAxpY1Xs4ORj+ZxF0Q/2vh0aTpCBuQ545RKDXnBow==","signatures":[{"sig":"MEQCIFNK/ytyX1VZUbq+68vPeD4IpMEPdIgjGlLMrBieDaxhAiBM/O25rWKIgVoKQkX88iAdJ2XeeWQGRMZVwGegNXQ0Yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16377},"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-mongo_2.1.6_1733213001624_0.6218699946228887","host":"s3://npm-registry-packages"}},"2.1.7":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"f89285db566f65aa8d6285b4e4144db8373f9dd2","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.7.tgz","fileCount":12,"integrity":"sha512-QtwiOYSZ242Dz0HE65jR6RgbEpCQcGIqT0tkRzSYrpNd/Vk7GoeRdbFJxL9MSVdKqzvvCWrD8iR0Ec3id7FXAw==","signatures":[{"sig":"MEQCIGKoeGvDtpTJm1e6j+9DUN4WTKhAuv1xnAQ+EunyMZ2yAiBIST4EWoPYMgmF+Z6nJiUkpGTtFJbsJEIaT9Q8Oqao4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16377},"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-mongo_2.1.7_1733213407013_0.9097598301390075","host":"s3://npm-registry-packages"}},"2.1.8":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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":"b1eaf6e51d374169a172b470675c9e69aabc9e93","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.8.tgz","fileCount":12,"integrity":"sha512-XzLb2xuXbqVPusOv743sR6IRRePSUf3TdyupKISqc36W/HilqE2NCnPFg7KqIM+5Vn8ptBwugdT22wXtYpK2Kw==","signatures":[{"sig":"MEYCIQCVl5nMWnxeChB3mqYu4yKBDhK5Yy8/IlVrOzmlWgx/ygIhAPufVRWBPsw9hLAVQZBg/dvZLqcBppQ8l6FLZjYlueQV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17276},"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-mongo_2.1.8_1733213926023_0.9868021636832143","host":"s3://npm-registry-packages"}},"2.1.9":{"name":"@canmertinyo/rate-limiter-mongo","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-mongo@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-xgReIidwdvTM+xCxHQrPHua+JviVcUzZPLGloFVhEieczR+cPGZIaoxTq/fXTXuSEuTo/pW2eHPQn8bK/LuXXw==","shasum":"dd1146701f57e4fd777b6d6b0f5f7cf3ef75dc9c","tarball":"https://registry.npmjs.org/@canmertinyo/rate-limiter-mongo/-/rate-limiter-mongo-2.1.9.tgz","fileCount":12,"unpackedSize":17424,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA6dJAg6Q9hV4P4Mk1K/i4ThD+ZH2uO2HOZaQ4fY4GObAiBM/iIc+bzv/mzuXqR+SikxR0b5eE0SCBOWWepDb+knKA=="}]},"_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-mongo_2.1.9_1733214528763_0.3366212806249942"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-30T12:14:18.441Z","modified":"2024-12-03T08:28:49.084Z","2.0.0":"2024-11-30T12:14:18.740Z","2.1.0":"2024-11-30T15:35:31.742Z","2.1.1":"2024-12-01T06:12:26.295Z","2.1.2":"2024-12-01T06:12:52.499Z","2.1.3":"2024-12-02T05:29:44.787Z","2.1.4":"2024-12-02T05:31:24.576Z","2.1.5":"2024-12-03T07:37:01.303Z","2.1.6":"2024-12-03T08:03:21.803Z","2.1.7":"2024-12-03T08:10:07.180Z","2.1.8":"2024-12-03T08:18:46.261Z","2.1.9":"2024-12-03T08:28:48.934Z"},"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```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"}