open-index/open-npm huggingface dataset:
npm package: @quuu/firewall
Description: Rate limiting via the Vercel Firewall
Latest version: 1.1.2

# @vercel/firewall

## Programmatic rate limits

[See our Firewall docs for detailed documentation of @vercel/firewall.](https://vercel.com/docs/vercel-waf/rate-limiting-sdk)

```ts
import { checkRateLimit } from '@vercel/firewall';

export async function POST() {
  const { rateLimited } = await checkRateLimit('my-rate-limit-id');
  if (rateLimited) {
    return new Response('', {
      status: 429,
    });
  }
  // Implement logic guarded by rate limit
}
```

<p align="center">
  <a href="https://vercel.com">
    <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
    <h3 align="center">Vercel</h3>
  </a>
  <p align="center">Develop. Preview. Ship.</p>
</p>