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

jest-filter

v1.0.0

Published

A CLI tool to display Jest coverage as a formatted table

Readme

jest-filter

A powerful CLI tool to display Jest coverage as a formatted, color-coded table. Instantly see which files and lines need more coverage, with advanced filtering, sorting, and detailed reporting.

Features & Unique Selling Points

  • Advanced Coverage Filtering:
    • Filter files by coverage percentage for statements, branches, functions, or lines.
    • Set lower/upper thresholds and filter by specific coverage type.
  • Customizable Sorting:
    • Sort files by any coverage metric, ascending or descending.
    • Option to sort globally (--flat-sort) or within folder hierarchy.
  • Professional, Readable Output:
    • Uses cli-table3 for clean, aligned tables.
    • Dynamic column widths to prevent data trimming.
    • Color-coded coverage values and uncovered lines (red/yellow) for instant visual feedback.
  • Detailed Uncovered Lines Reporting:
    • Shows uncovered statement and branch lines, color-coded, for each file.
  • Easy Integration:
    • Works with any Jest project.
    • CLI interface with intuitive options.
  • Demo & Example Project:
    • Includes an example/ folder for quick testing and demonstration.

Installation

npm install -g jest-filter

Usage

jest-filter [options]

Options

  • -s, --sort <field>: Sort by field (statements, branches, functions, lines). Default: statements
  • -o, --order <order>: Sort order (asc, desc). Default: asc
  • -l, --lower <threshold>: Filter files with coverage below this threshold. Default: 0
  • -u, --upper <threshold>: Filter files with coverage above this threshold. Default: 100
  • -t, --filter-field <field>: Coverage field to filter by (statements, branches, functions, lines). Default: statements
  • --flat-sort: Sort all files globally, ignoring folder hierarchy.
  • -p, --path <path>: Use existing coverage from path (skips Jest run). Defaults to coverage if no path provided.

Output Example

File                                 | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------------------------------------------------------------------------------------------
stacks/apis/src/services/baseService.ts |  96.03 |   79.72  | 100.00  |  96.03 | 204,207,223,228 39,76,86-89,103,172,198,199
...etc
  • Red: Uncovered statement lines
  • Yellow: Uncovered branch lines
  • Green: High coverage
  • Yellow: Medium coverage
  • Red: Low coverage

Example

See the example/ folder for a demo project and sample configuration.

Development

To run the example tests:

cd example
npm install
npm test

Why Use jest-filter?

  • Instantly see which files need more coverage and where.
  • Quickly identify problematic lines and branches.
  • Professional, readable output for CI, code reviews, and team dashboards.
  • Highly customizable to fit any workflow.

License

MIT