Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 46c50f7

Browse files
author
williamd5
committed
add read-only public RateLimit#name
1 parent c22a3e2 commit 46c50f7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/RateLimit.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ export class RateLimit {
5353
RateLimit.#instances.set(name, this);
5454
}
5555

56+
/**
57+
* Get rate limit name
58+
* @readonly
59+
*/
60+
get name(): string {
61+
return this.#name;
62+
}
63+
5664
/**
5765
* Check the attempt state for a source ID without decrementing the remaining attempts
5866
* @param {string} source - Unique source identifier (e.g. username, IP, etc.)

0 commit comments

Comments
 (0)