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

istanbul-reporter-html-dark

v1.0.1

Published

Istanbul HTML reporter with dark mode support

Readme

istanbul-reporter-html-dark

Istanbul HTML reporter with dark mode support and enhanced features. A fork of istanbul-reports with theming, file filtering, and improved aesthetics.

| Light Mode | Dark Mode | |------------|-----------| | Light Mode | Dark Mode |

Features

  • Theme Toggle: Light / Auto / Dark mode with manual override
  • File Name Filter: Search/filter files in the coverage tree
  • Catppuccin Colors: Catppuccin Latte (light) and Mocha (dark) color schemes
  • Inline SVG Icons: No external image dependencies
  • Theme Persistence: Your theme choice persists across pages via localStorage

Installation

npm install istanbul-reporter-html-dark

Usage

With c8

c8 --reporter=istanbul-reporter-html-dark npm test

With nyc

nyc --reporter=istanbul-reporter-html-dark npm test

Development

Build the React bundle

npm run build
# or watch mode
npm run build:watch

Project structure

├── index.js                 # Entry point (exports reporter class)
├── lib/
│   ├── html/                # Detail page reporter (per-file view)
│   │   ├── assets/
│   │   │   ├── base.css     # Theme styles + CSS variables
│   │   │   └── vendor/
│   │   │       └── prettify.css  # Syntax highlighting (Catppuccin)
│   │   └── index.js         # Includes theme persistence script
│   └── html-spa/            # Summary SPA reporter
│       ├── assets/
│       │   ├── spa.css      # Theme styles + CSS variables
│       │   └── bundle.js    # Built React app (gitignored, built on publish)
│       ├── src/
│       │   ├── index.js     # Main app with theme state management
│       │   ├── themeToggle.js    # Light/Auto/Dark toggle component
│       │   ├── fileNameFilter.js # File search/filter component
│       │   └── ...
│       └── webpack.config.js

Key files for customization

Theming (CSS variables):

  • lib/html-spa/assets/spa.css - SPA styles with :root, @media (prefers-color-scheme: dark), .theme-light, .theme-dark
  • lib/html/assets/base.css - Detail page styles (same pattern)
  • lib/html/assets/vendor/prettify.css - Syntax highlighting colors

Theme Toggle (React):

  • lib/html-spa/src/themeToggle.js - Toggle component
  • lib/html-spa/src/index.js - Theme state management + localStorage

Theme Persistence (Detail Pages):

  • lib/html/index.js - Inline script reads localStorage before render

Color Palette

Uses Catppuccin:

  • Light mode: Catppuccin Latte with boosted contrast for syntax highlighting
  • Dark mode: Catppuccin Mocha

Publishing

Preview what will be published

npm pack --dry-run

Publish flow

npm version patch  # or minor/major
npm publish

The prepare script automatically builds bundle.js before publishing.

Note: bundle.js is gitignored but included in the npm tarball via the files field.