npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@skiesjs/rate-limit-express

v0.1.0

Published

Explicit Express 5 rate limiting with the canonical Skies error envelope.

Readme

@skiesjs/rate-limit-express

Explicit Express 5 rate limiting that renders rejected requests through the Skies HTTP error contract. It uses the maintained express-rate-limit store ecosystem, but owns the public rejection shape: HTTP 429, the canonical RateLimit envelope, Retry-After, and draft-8 RateLimit headers. Legacy X-RateLimit-* headers are disabled.

Install

npm install @skiesjs/core @skiesjs/express @skiesjs/rate-limit-express express

Use

Register each policy explicitly where Express should apply it:

import express from "express";
import { createRateLimiter } from "@skiesjs/rate-limit-express";

const app = express();

app.use("/api", createRateLimiter({
  windowMs: 60_000,
  limit: 100,
}));

The default rejection is:

{
  "error": "RateLimit",
  "code": "platform.rate_limited",
  "message": "Too many requests. Please slow down.",
  "fields": null
}

Customize only the stable client contract when the application owns a different registry code:

app.use("/sign-in", createRateLimiter({
  windowMs: 15 * 60_000,
  limit: 5,
  code: "identity.sign_in_rate_limited",
  message: "Too many sign-in attempts. Please try again later.",
}));

By default, clients are partitioned by the safe IPv4/IPv6 strategy from express-rate-limit; no authentication middleware or request property is assumed. An application can supply an explicit key strategy and any compatible store, including a shared production store:

import type { Store } from "@skiesjs/rate-limit-express";

const store: Store = createSharedRateLimitStore();

app.use(createRateLimiter({
  windowMs: 60_000,
  limit: 20,
  store,
  keyGenerator: (request) => request.get("x-api-client") ?? request.ip,
}));

A store should return its actual resetTime so Retry-After and the standard rate-limit headers describe the remaining window precisely. Counter failures are fail-closed: they are forwarded to the normal Express error pipeline instead of allowing an uncounted request through. Place the application's error middleware after the limiter and routes.