Practic Passkey - v1.0.0
    Preparing search index...

    Interface Limiter

    Counts hits per key in fixed windows, so the server can refuse a key that asks too often. Any shared counter can stand behind it, such as the app's store (the default), Redis, or a single process's memory.

    interface Limiter {
        hit: (key: string, rule: LimiterRule) => Promise<LimiterVerdict>;
        peek: (key: string, rule: LimiterRule) => Promise<LimiterVerdict>;
    }
    Index
    hit: (key: string, rule: LimiterRule) => Promise<LimiterVerdict>

    Count a hit on a key, unless its window is already full, and say whether it was allowed.

    peek: (key: string, rule: LimiterRule) => Promise<LimiterVerdict>

    Say whether a key's window is full, without counting a hit.