UNPKG

@yveskaufmann/koa2-ratelimit

Version:

IP rate-limiting middleware for Koajs 2. Use to limit repeated requests to APIs and/or endpoints such as password reset.

13 lines 564 B
import { Store, HitState } from "./Store"; import { RateLimitOptions } from "../Options"; export declare class MemoryStore extends Store { private static Hits; static cleanAll(): void; _getHit(key: string, options?: RateLimitOptions): HitState; _resetAll(): void; _resetKey(key: string, now: number): void; incr(key: string, options: RateLimitOptions, weight: number): Promise<HitState>; decrement(key: string, options: RateLimitOptions, weight: number): Promise<void>; saveAbuse(): void; } //# sourceMappingURL=MemoryStore.d.ts.map