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

oxidil

v0.4.0

Published

A JavaScript/TypeScript optimizing compiler (oxc front-end), compiled to WebAssembly. Parses JS/TS, strips types, runs sound -O-gated optimization passes, and emits optimized JS + a v3 source map.

Readme

oxidil

A JavaScript / TypeScript optimizing compiler — the Rust oxidil crate (built on the oxc ecosystem) compiled to WebAssembly and wrapped in a typed Node API and CLI.

It parses JS/TS, optionally strips TypeScript types, runs a set of sound optimization passes gated by a GCC-flavored -O level, and emits optimized JavaScript plus a v3 source map. Everything runs in-process inside the WASM module — no node/terser/esbuild/swc is shelled out to.

Install

npm install oxidil

Requires Node.js >= 18. The WebAssembly module is bundled — there is no native build step at install time.

API

import { compile } from "oxidil";

const { code, map } = compile("const a = 1 + 2 * 3;\nconsole.log(a);\n", {
  level: "2",
  sourceMap: true,
});

console.log(code); // "const a = 7;\nconsole.log(a);\n"

compile(source, options?) => { code, map? }

| Option | Type | Default | Meaning | |--------|------|---------|---------| | filename | string | "input.js" | Source type is inferred from the extension (.js .jsx .mjs .cjs .ts .tsx); also used as the sources entry of the map. | | level | "0"\|"1"\|"2"\|"3"\|"s"\|"z" (or 03) | "2" | Optimization level (see below). | | tsTypeof | boolean | false | Enable the ts-typeof-elimination pass (effective only at level >= 1). | | enable | string[] | [] | Force-include passes by id even if the level gates them off. | | disable | string[] | [] | Force-exclude passes by id. Disable wins over enable. | | sourceMap | boolean | false | Produce an output v3 source map (returned as map, a JSON string). | | inputSourceMap | string | — | JSON of an input map; the output map is composed back to the original sources. |

CLI

oxidil <INPUT> --out <FILE> [--out-map <FILE>] [--source-map <FILE>]
        [-O<level>] [--ts-typeof]
        [--enable <ID>]... [--disable <ID>]...
npx oxidil app.ts --out app.js --out-map app.js.map -O2

| Flag | Meaning | |------|---------| | <INPUT> | Input file. Source type inferred from extension. | | --out <FILE> | Required. Where optimized JS is written. | | --out-map <FILE> | Where the output source map is written (and a //# sourceMappingURL= comment is appended). | | --source-map <FILE> | Input source map for <INPUT>; the output map is composed back to the original sources. | | --ts-typeof | Enable ts-typeof-elimination. | | -O0/-O1/-O2/-O3/-Os | Optimization level (default -O2). -O == -O1, -Oz == -Os. Aliases -0..-3/-s and --O0..--Os also work. | | --enable <ID> / --disable <ID> | Force a pass on/off (repeatable; disable wins). |

Exit codes: 0 ok, 1 parse error, 2 IO error, 64 usage error.

Optimization levels

| Level | Passes | |-------|--------| | -O0 | None (parse → type-strip if TS → passthrough). | | -O1 | Constant folding + peephole/algebraic. | | -O2 (default) | -O1 + dead-code elimination at full fixpoint. | | -O3 | -O2 with a higher fixpoint cap (more aggressive). | | -Os / -Oz | -O2 + identifier minify/rename + compact codegen (size). |

Building from source

The published package ships prebuilt WASM. To rebuild it you need the Rust toolchain plus wasm-pack. The version lives in the crate's Cargo.toml (the source of truth); npm/package.json and npm/src/version.ts are generated from it and are gitignored — so build from the repo root with make:

make npm     # generates the version files, then runs wasm-pack + tsc

Or, if the generated files already exist (make generate):

npm run build        # build:wasm (wasm-pack) + build:ts (tsc)
npm test

License

MIT