If you use an invalid period string, eg. because of a typo (new RateLimiter(10, "horu")), the library will fallback to "second", rather than throwing an error. This fallback is completely unexpected, and can cause outright wrong behaviour in the event of typos (as just happened to me).
If you use an invalid period string, eg. because of a typo (
new RateLimiter(10, "horu")
), the library will fallback to"second"
, rather than throwing an error. This fallback is completely unexpected, and can cause outright wrong behaviour in the event of typos (as just happened to me).