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

xpress-fuse

v0.2.0

Published

Production-ready, lightweight middleware bundle for Express.js with TypeScript support

Readme

xpress-fuse

A production-ready, lightweight middleware bundle for Express.js with first-class TypeScript support. Sane security, performance, and observability defaults in a single import.


Features

  • Security Headers: Powered by helmet with sensible default policies
  • CORS Support: Pre-configured cors handling with full customization
  • Gzip / Brotli Compression: Powered by compression with x-no-compression header bypass support
  • Rate Limiting: Built-in express-rate-limit protecting routes against brute-force and DDoS
  • HTTP Request Logging: Integrated morgan logging formatted for development and production
  • Body Parsing: JSON and URL-encoded body parsing with configurable payload size limits
  • Request Timeout: Prevents hanging requests with connect-timeout
  • Optional Health Check: Zero-config /health endpoint for Kubernetes and load balancers
  • Dual Module Support: Full CommonJS and ESM support with bundled TypeScript type definitions

Installation

npm install xpress-fuse

Peer dependency: express (^4.21.2 or ^5.0.0).


Usage

TypeScript / ES Modules (ESM)

import express from "express";
import xpressFuse from "xpress-fuse";

const app = express();

// Apply default middleware stack
app.use(xpressFuse());

app.get("/", (req, res) => {
  res.json({ message: "Hello, World!" });
});

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
});

CommonJS (CJS)

const express = require("express");
const xpressFuse = require("xpress-fuse");

const app = express();

// Mount directly with the helper
xpressFuse.attach(app);

app.get("/", (req, res) => {
  res.json({ message: "Hello, World!" });
});

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
});

Configuration

All middlewares can be customized or disabled by passing an options object:

import express from "express";
import xpressFuse from "xpress-fuse";

const app = express();

app.use(
  xpressFuse({
    cors: {
      origin: "https://yourdomain.com",
      methods: ["GET", "POST", "PUT", "DELETE"],
      credentials: true,
    },
    helmet: {
      contentSecurityPolicy: false,
    },
    rateLimit: {
      windowMs: 15 * 60 * 1000, // 15 minutes
      max: 100, // Limit each IP to 100 requests per windowMs
    },
    logging: "combined", // "dev" | "combined" | "common" | "short" | "tiny"
    timeout: 10000, // 10s request timeout
    bodyParserLimit: "5mb",
    healthCheck: {
      path: "/healthz",
      response: { status: "healthy", uptime: process.uptime() },
    },
  })
);

Options Reference

| Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | cors | boolean \| CorsOptions | true | CORS settings or false to disable | | helmet | boolean \| HelmetOptions | true | Helmet security headers or false to disable | | compression | boolean \| CompressionOptions | true | Gzip/deflate compression or false to disable | | rateLimit | boolean \| RateLimitOptions | 100 req / 15 min | Rate limiting configuration or false to disable | | logging | boolean \| string | "dev" | Morgan log format ("dev", "combined", etc.) or false | | timeout | number \| boolean | 5000 | Request timeout in milliseconds or false to disable | | bodyParser | boolean \| BodyParserOptions | true | Body parser settings or false to disable | | bodyParserLimit | string \| number | "1mb" | Payload size limit for JSON and URL-encoded bodies | | healthCheck | boolean \| string \| HealthCheckOptions | false | Route path or config for built-in health check |


License

MIT License. Copyright (c) Andrea Pallotta.