UNPKG

@da440dil/js-counter

Version:

Distributed rate limiting using Redis

12 lines (11 loc) 253 B
import { Result } from './Result'; /** * Implements distributed rate limiting. */ export interface ILimiter { /** * Applies the limit. * @param key The key to be incremented. */ limit(key: string): Promise<Result>; }