{"_id":"@bejibun/limiter","_rev":"7-b0d216c37d2d0dec04a391c73ab6b042","name":"@bejibun/limiter","dist-tags":{"latest":"0.1.13"},"versions":{"0.1.1":{"name":"@bejibun/limiter","version":"0.1.1","keywords":["bun","bun framework","limiter","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/limiter@0.1.1","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-limiter#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-limiter/issues"},"dist":{"shasum":"86923cfed377104c83cc85d5f2b954e5d1a048b3","tarball":"https://registry.npmjs.org/@bejibun/limiter/-/limiter-0.1.1.tgz","fileCount":21,"integrity":"sha512-YPC8MEKnrlxxFVwDee77y64t25v5/XmeWjgublRaO9ogw9C5JH0FZ9l9NZ+xJ8yrwJzdabPi9YHlRR44A7yVJA==","signatures":[{"sig":"MEUCIEMLTOlB+wPYMMa6smob9Zpn7ixgpTiYFHLfNtnjjNo4AiEA28MiiRB9qXnbDcd8Ro2U0V0/WYRImwo0HBqhZ+uP+Fg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11088},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"86923cfed377104c83cc85d5f2b954e5d1a048b3","scripts":{"alias":"bunx tsc-alias -p tsconfig.json","build":"bunx tsc -p tsconfig.json && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","deploy":"bun run build && bun publish --access public"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-YPC8MEKnrlxxFVwDee77y64t25v5/XmeWjgublRaO9ogw9C5JH0FZ9l9NZ+xJ8yrwJzdabPi9YHlRR44A7yVJA==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-limiter.git","type":"git"},"_npmVersion":"10.8.3","description":"Limiter for Bejibun Framework","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@bejibun/app":"^0.1.24","@bejibun/cache":"^0.1.24","@bejibun/utils":"^0.1.28","@bejibun/logger":"^0.1.22"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.9.1","@types/bun":"latest"},"_npmOperationalInternal":{"tmp":"tmp/limiter_0.1.1_1786877406228_0.2736322943909504","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@bejibun/limiter","version":"0.1.11","keywords":["bun","bun framework","limiter","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/limiter@0.1.11","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-limiter#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-limiter/issues"},"dist":{"shasum":"b052cac063e864ad3ca82ed7c15792e806928e56","tarball":"https://registry.npmjs.org/@bejibun/limiter/-/limiter-0.1.11.tgz","fileCount":24,"integrity":"sha512-MCfofnUguhwP8eb0xjVYEBzfhIyOIPtIgDb9cn+2jqsF1gZhwK97NvadZYP8ruXTxSDB8hs0OY0WZFsPaoze4A==","signatures":[{"sig":"MEYCIQCvben3yro/o2LJkZMF1NMpIgNlKxLih93xw8m+9AYoXgIhAJ/RCfbVGVJeB4fqXo22lcj0OsjTz4e2AK271LwToulv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15545},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"b052cac063e864ad3ca82ed7c15792e806928e56","scripts":{"lint":"bun run format && bun run eslint","alias":"tsc-alias -p tsconfig.json","build":"bun run lint && tsc -p tsconfig.json && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","deploy":"bun run build && bun publish --access public","eslint":"eslint src","format":"prettier --write src --log-level=silent"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-MCfofnUguhwP8eb0xjVYEBzfhIyOIPtIgDb9cn+2jqsF1gZhwK97NvadZYP8ruXTxSDB8hs0OY0WZFsPaoze4A==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-limiter.git","type":"git"},"_npmVersion":"10.8.3","description":"Limiter for Bejibun Framework","directories":{},"_nodeVersion":"26.3.0","dependencies":{"@bejibun/app":"^0.1.25","@bejibun/cache":"^0.1.25","@bejibun/utils":"^0.1.29","@bejibun/logger":"^0.1.23"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.1","globals":"^17.11.0","prettier":"^3.9.6","tsc-alias":"^1.9.2","@eslint/js":"^10.0.1","@types/bun":"^1.3.14","typescript":"^6.0.3","typescript-eslint":"^8.67.0","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/limiter_0.1.11_1787237602290_0.9862307885887553","host":"s3://npm-registry-packages-npm-production"}},"0.1.12":{"name":"@bejibun/limiter","version":"0.1.12","keywords":["bun","bun framework","limiter","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/limiter@0.1.12","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-limiter#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-limiter/issues"},"dist":{"shasum":"4fa6632f5408b81036a08cfe6ada7c72836e6b02","tarball":"https://registry.npmjs.org/@bejibun/limiter/-/limiter-0.1.12.tgz","fileCount":36,"integrity":"sha512-7MFpEQwXUX75xPFY7mirQKOxHqvunsMhMnZstS1r1ZjUsnZP515QkRyTxxclF+jnC8zlTSOgV1/9iDa7dJp2oQ==","signatures":[{"sig":"MEYCIQDvkw0I+sGxI60/Zh5MsSyZBUBDxx8B6rfW8TAAzFFl/wIhAL0WOsssQRP6emsxiSpxeM3m0bLTvRHPPoSqUK7iPTNp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52044},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"4fa6632f5408b81036a08cfe6ada7c72836e6b02","scripts":{"lint":"bun run format && bun run eslint","test":"bun test tests/","alias":"tsc-alias -p tsconfig.json","build":"bun run lint && tsc -p tsconfig.json && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","deploy":"bun run build && bun publish --access public","eslint":"eslint src","format":"prettier --write src --log-level=silent"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-7MFpEQwXUX75xPFY7mirQKOxHqvunsMhMnZstS1r1ZjUsnZP515QkRyTxxclF+jnC8zlTSOgV1/9iDa7dJp2oQ==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-limiter.git","type":"git"},"_npmVersion":"10.8.3","description":"Limiter for Bejibun Framework","directories":{},"_nodeVersion":"26.3.0","dependencies":{"@bejibun/app":"^0.1.26","@bejibun/cache":"^0.1.26","@bejibun/utils":"^0.1.30","@bejibun/logger":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.9.1","globals":"^17.12.0","prettier":"^3.9.6","tsc-alias":"^1.9.4","@eslint/js":"^10.0.1","@types/bun":"^1.4.0","typescript":"^6.0.3","typescript-eslint":"^8.69.0","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/limiter_0.1.12_1788516443852_0.3764051818507852","host":"s3://npm-registry-packages-npm-production"}},"0.1.13":{"name":"@bejibun/limiter","version":"0.1.13","author":"Havea Crenata <havea.crenata@gmail.com>","repository":{"type":"git","url":"git+https://github.com/Bejibun-Framework/bejibun-limiter.git"},"main":"index.js","module":"index.js","devDependencies":{"@eslint/js":"^10.0.1","@types/bun":"^1.4.2","eslint":"^10.10.0","eslint-config-prettier":"^10.1.8","globals":"^17.12.0","prettier":"^3.9.6","tsc-alias":"^1.9.4","typescript":"^6.0.3","typescript-eslint":"^8.70.0"},"bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-limiter/issues"},"description":"Limiter for Bejibun Framework","homepage":"https://github.com/Bejibun-Framework/bejibun-limiter#readme","keywords":["bun","bun framework","limiter","bejibun","typescript"],"license":"MIT","scripts":{"alias":"tsc-alias -p tsconfig.json","rsync":"rsync -a dist/ ./","clean":"rm -rf dist","format":"prettier --write src --log-level=silent","eslint":"eslint src","lint":"bun run format && bun run eslint","test":"bun test tests/","build":"bun run lint && tsc -p tsconfig.json && bun run alias && bun run rsync && bun run clean","deploy":"bun run build && bun publish --access public"},"type":"module","types":"index.d.ts","dependencies":{"@bejibun/app":"^0.1.27","@bejibun/cache":"^0.1.27","@bejibun/logger":"^0.2.10","@bejibun/utils":"^0.1.31"},"_id":"@bejibun/limiter@0.1.13","_integrity":"sha512-jQ087Tclqf6x++k3c0pUAy6/amCDX6SJWRNZTl/IxRxl/Wo/JhBJyWe3zcT9aL8sSNHFQrEYqwsmCMq7oI8LAA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"75e0f0041e68649832f6a619cfbfaffbda4c95c9","dist":{"integrity":"sha512-jQ087Tclqf6x++k3c0pUAy6/amCDX6SJWRNZTl/IxRxl/Wo/JhBJyWe3zcT9aL8sSNHFQrEYqwsmCMq7oI8LAA==","shasum":"75e0f0041e68649832f6a619cfbfaffbda4c95c9","tarball":"https://registry.npmjs.org/@bejibun/limiter/-/limiter-0.1.13.tgz","fileCount":36,"unpackedSize":52046,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH+N717OrPCblf6rIOslLtuhNAbA4ZlDsTGgbusfYRqZAiEAilHf7cJHZC1qPheXPA3i3fUsm9o8e8pwgpl/zwSNVL4="}]},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"directories":{},"maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/limiter_0.1.13_1788850838097_0.6561340947026655"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T10:50:06.087Z","modified":"2026-09-08T07:00:38.426Z","0.1.0":"2026-08-16T10:36:36.287Z","0.1.1":"2026-08-16T10:50:06.393Z","0.1.11":"2026-08-20T14:53:22.456Z","0.1.12":"2026-09-04T10:07:23.983Z","0.1.13":"2026-09-08T07:00:38.231Z"},"bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-limiter/issues"},"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","homepage":"https://github.com/Bejibun-Framework/bejibun-limiter#readme","keywords":["bun","bun framework","limiter","bejibun","typescript"],"repository":{"type":"git","url":"git+https://github.com/Bejibun-Framework/bejibun-limiter.git"},"description":"Limiter for Bejibun Framework","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/bejibun.png?raw=true\" width=\"150\" alt=\"Bejibun\" />\n\n![GitHub top language](https://img.shields.io/github/languages/top/Bejibun-Framework/bejibun-limiter)\n![NPM Downloads](https://img.shields.io/npm/d18m/%40bejibun%2Flimiter)\n![GitHub issues](https://img.shields.io/github/issues/Bejibun-Framework/bejibun-limiter)\n![GitHub](https://img.shields.io/github/license/Bejibun-Framework/bejibun-limiter)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Bejibun-Framework/bejibun-limiter?display_name=tag&include_prereleases)\n\n</div>\n\n# Limiter for Bejibun\n\nLimiter for Bejibun Framework.\n\n## Usage\n\n### Installation\n\nInstall the package.\n\n```bash\n# Using Bun\nbun add @bejibun/limiter\n\n# Using Bejibun\nbun ace install @bejibun/limiter\n```\n\n### Configuration\n\nThe configuration file automatically executed if you are using `ace`.\n\nOr\n\nAdd `limiter.ts` inside config directory on your project if doesn't exist.\n\n```bash\nconfig/limiter.ts\n```\n\n```ts\nconst config: Record<string, any> = {\n    limit: 60,\n    duration: 60 // seconds\n};\n\nexport default config;\n```\n\nYou can pass the value with environment variables.\n\n### How to Use\n\nHow to use tha package.\n\n```ts\nimport RateLimiter from \"@bejibun/limiter\";\n\nawait RateLimiter.attempt(`user:${user.id}`, 60 /* limit */, () => {\n    //\n}, 60 /* duration (optional) */);\nawait RateLimiter.tooManyAttempts(`user:${user.id}`, 60 /* limit */, 60 /* duration (optional) */);\nawait RateLimiter.clear(`user:${user.id}`);\n```\n\n## ☕ Support / Donate\n\nIf you find this project helpful and want to support it:\n\n[![Donate](https://img.shields.io/badge/Donate-Support%20Me-orange?style=for-the-badge)](https://donate.bejibun.com)\n\nOr you can buy this `$BJBN (Bejibun)` tokens [here](https://pump.fun/coin/CQhbNnCGKfDaKXt8uE61i5DrBYJV7NPsCDD9vQgypump).","readmeFilename":"README.md"}