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

@cordonhq/guard-node

v0.1.7

Published

Protect any Node service with CORDON — an application-layer traffic firewall that evaluates every request inline and blocks bots and abuse. No proxy, no DNS change.

Readme

@cordonhq/guard-node

Application-layer traffic protection for any Node service. @cordonhq/guard-node connects your app to CORDON, a traffic firewall that evaluates every incoming request in real time and lets your application respond only to legitimate visitors — automated, abusive, or unverified traffic is blocked with a safe response.

No reverse proxy and no DNS change: the classification engine runs on CORDON's servers, and this SDK is a thin client that forwards each request's context, receives a decision (allow / verify / block), and enforces it for you.

Install

npm install @cordonhq/guard-node

Create a protection in the dashboard, copy its API key, and set it in your server environment:

CORDON_GUARD_KEY=gk_live_…

Next.js

// middleware.ts
import { NextResponse } from 'next/server';
import { createGuard } from '@cordonhq/guard-node';

const guard = createGuard({
  apiKey: process.env.CORDON_GUARD_KEY!,
  baseUrl: 'https://guard.cordon.cc',
});

export const middleware = guard.middleware(NextResponse);
export const config = { matcher: ['/', '/pricing/:path*'] };

Express

import express from 'express';
import { createGuard } from '@cordonhq/guard-node';

const guard = createGuard({ apiKey: process.env.CORDON_GUARD_KEY!, baseUrl: 'https://guard.cordon.cc' });

const app = express();
app.set('trust proxy', 1); // so the real client IP is read, not your proxy's
app.use(guard.express());

The client IP is the one thing to get right

CORDON evaluates whatever IP you send. Behind a CDN or load balancer, derive the visitor's real IP from x-forwarded-for — a wrong IP silently voids every IP, geo, and network rule. The adapters use getClientIp() for you; set trustedHops to the number of proxies you run if you're behind more than the platform's own.

Options

| Option | Default | | | --- | --- | --- | | apiKey | — | Your protection's API key. Server-side only. | | baseUrl | — | The CORDON API base URL. | | failMode | 'open' | 'open' serves the request if CORDON is unreachable; 'closed' blocks. | | timeoutMs | 500 | Per-request timeout for the API call. |

Decisions are cached in a signed, per-visitor cookie for the decision's lifetime, so only the first request in a session makes an API call.