MCPcopy
hub / github.com/express-rate-limit/express-rate-limit / get

Method get

test/library/headers-test.ts:239–244  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

237 hits: Map<string, number> = new Map()
238
239 async get(key: string): Promise<ClientRateLimitInfo> {
240 return {
241 totalHits: this.hits.get(key) ?? 0,
242 resetTime: undefined,
243 }
244 }
245
246 async increment(key: string): Promise<ClientRateLimitInfo> {
247 const count = (this.hits.get(key) ?? 0) + 1

Callers 5

validation-test.tsFile · 0.45
headers-test.tsFile · 0.45
incrementMethod · 0.45
createServerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected