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

rolling-rate-limiter

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rolling-rate-limiter - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

package.json
{
"name": "rolling-rate-limiter",
"version": "0.2.0",
"version": "0.2.1",
"description": "Rate limiter that supports a rolling window, either in-memory or backed by Redis",
"main": "index.js",
"scripts": {
"lint": "eslint . --fix",
"lint": "eslint ./src --fix",
"prepublish": "tsc",
"test": "jest"

@@ -9,0 +10,0 @@ },

@@ -12,2 +12,12 @@ # Rolling Rate Limiter

## Upgrading from 0.1
Version 0.2 was released August 31 2020. The method of operation remains the same, but the API has changed. A short summary of the changes:
* Library was rewritten in Typescript.
* Rate limiters are now instances of a `RateLimiter` class.
* Methods now use promises instead of callbacks.
* A `wouldLimit` method is now available to see if an action would be blocked, without actually "counting" it as an action.
* `limitWithInfo` and `wouldLimitWithInfo` methods are available to return more information about how and why an action was blocked or not blocked.
* Tests were rewritten in Jest, and run on both `redis` and `ioredis` clients.
## Quick start

@@ -14,0 +24,0 @@ Basic use in an Express application.

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