Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-ratelimiter

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-ratelimiter - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

50

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://nicedoc.io/microlinkhq/async-ratelimiter",
"version": "1.3.0",
"version": "1.3.1",
"main": "src/index.js",

@@ -15,32 +15,4 @@ "author": {

{
"name": "Kiko Beats",
"name": "Kiko",
"email": "josefrancisco.verdu@gmail.com"
},
{
"name": "Imed Jaberi",
"email": "imed_jebari@hotmail.fr"
},
{
"name": "Marcus Poehls",
"email": "marcus.poehls@gmail.com"
},
{
"name": "Ayan Yenbekbay",
"email": "ayan.yenb@gmail.com"
},
{
"name": "offirmo",
"email": "offirmo.net@gmail.com"
},
{
"name": "Nico Kaiser",
"email": "nico@kaiser.me"
},
{
"name": "amanda",
"email": "amandalucis@gmail.com"
},
{
"name": "kornel-kedzierski",
"email": "pl.kornel@gmail.com"
}

@@ -66,2 +38,3 @@ ],

"@commitlint/config-conventional": "latest",
"c8": "latest",
"ci-publish": "latest",

@@ -72,6 +45,5 @@ "conventional-github-releaser": "latest",

"ioredis": "latest",
"lint-staged": "latest",
"mocha": "latest",
"nano-staged": "latest",
"npm-check-updates": "latest",
"nyc": "latest",
"prettier-standard": "latest",

@@ -94,6 +66,4 @@ "should": "latest",

"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "standard-markdown README.md && standard",
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
"precommit": "lint-staged",
"prerelease": "npm run update:check && npm run contributors",

@@ -104,3 +74,3 @@ "pretest": "npm run lint",

"release:tags": "git push --follow-tags origin HEAD:master",
"test": "nyc mocha --exit",
"test": "c8 mocha --exit",
"update": "ncu -u",

@@ -115,6 +85,3 @@ "update:check": "ncu -- --error-level 2"

},
"lint-staged": {
"package.json": [
"finepack"
],
"nano-staged": {
"*.js,!*.min.js,": [

@@ -125,2 +92,5 @@ "prettier-standard"

"standard-markdown"
],
"package.json": [
"finepack"
]

@@ -130,3 +100,3 @@ },

"commit-msg": "npx commitlint --edit",
"pre-commit": "npx lint-staged"
"pre-commit": "npx nano-staged"
},

@@ -133,0 +103,0 @@ "standard": {

17

README.md
<div align="center">
<img src="https://cdn.microlink.io/logo/banner.png" alt="microlink">
<br>
<br>
</div>

@@ -34,3 +36,3 @@

const clientIp = getClientIp(req)
const limit = await rateLimiter.get({ id: req.clientIp })
const limit = await rateLimiter.get({ id: clientIp })

@@ -45,7 +47,8 @@ if (!res.finished && !res.headersSent) {

? sendFail({
req,
res,
code: HTTPStatus.TOO_MANY_REQUESTS,
message: MESSAGES.RATE_LIMIT_EXCEDEED()
}) : next(req, res)
req,
res,
code: HTTPStatus.TOO_MANY_REQUESTS,
message: MESSAGES.RATE_LIMIT_EXCEDEED()
})
: next(req, res)
}

@@ -64,3 +67,3 @@ ```

*Required*<br>
_Required_<br>
Type: `object`

@@ -67,0 +70,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc