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

@wxn0brp/falcon-frame-plugin

v0.0.6

Published

Plugin system for FalconFrame

Readme

FalconFrame Plugin System

Plugin system for FalconFrame with dependency management and built-in middleware.

Installation

npm install @wxn0brp/falcon-frame-plugin @wxn0brp/falcon-frame

Quick Start

import FalconFrame from "@wxn0brp/falcon-frame";
import { PluginSystem } from "@wxn0brp/falcon-frame-plugin";

const app = new FalconFrame();
const plugins = new PluginSystem();

plugins.register({
  id: "logger",
  process: (req, res, next) => {
    console.log(`${req.method} ${req.url}`);
    next();
  }
});

app.use(plugins);
app.get("/", () => "Hello World");
app.listen(3000);

API

PluginSystem

| Property/Method | Type | Description | |---|---|---| | plugins | Plugin[] | Registered plugins array | | _sorted | boolean | Sort state flag | | register(plugin, opts?) | (Plugin, PSOpts?) => void | Register plugin with optional ordering | | getRouteHandler() | () => RouteHandler | Returns middleware handler | | _sort() | () => void | Manually trigger re-sort |

Types

interface Plugin {
  id: string;                 // Unique identifier
  process: RouteHandler;      // (req, res, next) => void
  before?: string | string[]; // Run before these plugins
  after?: string | string[];  // Run after these plugins
}

interface PSOpts {
  before?: string | string[]; // Override plugin.before
  after?: string | string[];  // Override plugin.after
}

Built-in Plugins

IP Filter

import { createIPFilterPlugin } from "@wxn0brp/falcon-frame-plugin/plugins/ipFilter";

plugins.register(createIPFilterPlugin({
  allow: ["127.0.0.1", "::1", "10.0.0.0/8"],
  block: ["192.168.1.100"],
  statusCode: 403,
  message: "Forbidden"
}));

| Option | Type | Description | |---|---|---| | allow | string \| string[] | IPs/CIDRs to allow | | block | string \| string[] | IPs/CIDRs to block | | statusCode | number | Default: 403 | | message | string | Default: "Forbidden" | | onBlocked | (req, res) => void | Custom blocked handler |

Supports IPv4, IPv6, and CIDR notation. Allow-list takes priority.

Rate Limiter

import { createRateLimiterPlugin } from "@wxn0brp/falcon-frame-plugin/plugins/rateLimit";

plugins.register(createRateLimiterPlugin({
  maxRequests: 100,
  windowMs: 15 * 60 * 1000,
  id: (req) => req.headers["x-api-key"] || req.socket.remoteAddress
}));

| Option | Type | Description | |---|---|---| | maxRequests | number | Max requests per window | | windowMs | number | Window duration in ms | | id | (req) => string \| Promise<string> | Custom key generator | | onLimitReached | (req, res, ctx) => void | Custom limit handler | | sharedMap | Map<string, RateLimitRecord> | Shared state between limiters | | disableCleanup | boolean | Disable auto-cleanup (default: false) |

Default response: 429 Too Many Requests with Retry-After header.

Security Headers

import { createSecurityPlugin } from "@wxn0brp/falcon-frame-plugin/plugins/security";

plugins.register(createSecurityPlugin());

Sets the following headers:

  • X-Content-Type-Options: nosniff
  • X-Frame-Options: SAMEORIGIN
  • Referrer-Policy: no-referrer
  • X-XSS-Protection: 1; mode=block
  • Strict-Transport-Security: max-age=31536000; includeSubDomains

Implicit ordering: after: "cors".

License

MIT