A higher-order function that creates a middleware factory which wraps
function calls with a rate limiter.
Each unique key (derived from the wrapped function's arguments) gets its
own rate-limit counter. When the maximum number of invocations (limit)
is exceeded within the configured window subsequent calls throw a
rate-limit error instead of executing the wrapped function.
A higher-order function that creates a middleware factory which wraps function calls with a rate limiter.
Each unique key (derived from the wrapped function's arguments) gets its own rate-limit counter. When the maximum number of invocations (
limit) is exceeded within the configured window subsequent calls throw a rate-limit error instead of executing the wrapped function.