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

exoptim

v0.0.10

Published

Optimizes Express

Readme

EXOptim

https://nodei.co/npm/exoptim.png?downloads=true&downloadRank=true&stars=true

Nodejs compression via zlib and others with other useful features.

(It is recommended to change express.static() to exoptim.static())

Changlog

V0.0.10

Fixed some issues with res.sendFile and changed compression method

Added autoType and secure to options

Installation

index.js:

const express = require("express");
const exoptim = require("exoptim");

const app = express();

app.use(exoptim(/* Options */));

app.get("/", (req, res, next) => {
  res.sendFile(__dirname + "/index.html");
});

app.listen(3000, () => {
  console.log("Hello World!");
});

index.html:

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <p>Hello World!</p>
  </body>
</html>

Just type node index.js to run the server.

Usage

/*express app*/.use(/*exoptim require*/(/*options*/));

Options

Default / Example.

{
  forceCompressionType: "gzip",
  forceCompression: false,
  changeSendFile: true,
  cacheControl: "no-cache",
  flushInterval: 1500,
}

forceCompressionType

Allowed Values:

gzip - Forces the "GZip" compression type type when data is sent. (Recommended)

deflate - Forces the "Deflate" compression type type when data is sent.

br <-> brotli - Forces the "Brotli" compression type when data is sent.

(ONLY ACTIVATED IF forceCompression IS true)

forceCompression

Allowed Values:

true - Forces compression to be set to "forceCompressionType" value.

false - Uses automatic compression. (Recommended)

changeSendFile

Allowed Values:

true - Changes res.sendFile() command to custom command to optimize command. (Recommended)

false - Uses default res.sendFile() command.

cacheControl

Allowed Values:

See mozilla documentation on cache-control header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)

flushInterval

Allowed Values:

Number in MS (One millisecond is 1,000 times smaller than a second)

changeExIp

Allowed Values:

true - Changes the value of req.exip to the users ip value or array stated in options.returnMultiIp (Recommended)

false - Disables the changing of req.exip

returnMultiIp

Allowed Values:

true - Returns an array instead of a string (Includes all ips instead of first ip)

false - Returns first ip (Recommended)

returnIpType

Allowed Values:

ipv4 - Returns on ipv4 addresses (Recommended)

ipv6 - Returns only ipv6 addresses

both - Returns both ip values into array, or if disable, checks every ip

flush (New)

Allowed Values:

true: Flushes the headers every flushInterval ms (Recommended)

false: Don't flush the headers

minCompression (New)

Allowed Values:

Number in bytes, 1000 is 1 kilobyte, 1000 * 1000 is 1 megabyte, 1000 * 1000 * 1000 is 1 gigabyte (10 is recommended)

autoType (New)

Allowed Values:

true: Automatically sets the res.type (Recommended)

false: Leaves res.type blank

secure (New)

Allowed Values:

true: Uses best options

false: Disables secure

{}: Comming Soon, will default to true