UNPKG

rate-limiter-custom

Version:

A fast, customizable, and efficient rate-limiting middleware for Express in TypeScript.

9 lines (8 loc) 221 B
export interface RateLimiterOptions { windowMs: number; maxRequests: number; algo?: "sliding" | "fixed" | "token" | "leaky"; tokensPerInterval?: number; leakRate?: number; errorMessage?: string; }