UNPKG

@da440dil/js-counter

Version:

Distributed rate limiting using Redis

12 lines (11 loc) 342 B
/** Counter value increment result. */ export declare type Result = { /** Operation success flag. */ ok: boolean; /** Current counter value. */ counter: number; /** Diff between limit and current counter value. */ remainder: number; /** TTL of the current window in milliseconds. */ ttl: number; };