Skip to main content

Overview

limiter.check() is the core method. Call it before any business logic you want to rate limit.

Parameters

Return Value (CheckResult)

Basic Example

Express Route Example

Error Handling

check() throws a RateLimiterError in these cases:

Response Headers (Optional Pattern)

It’s good practice to expose rate limit info in response headers: