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

@huyz0/tzap

v0.1.1

Published

Fast, diff-aware mutation testing for TypeScript and JavaScript

Readme

tzap

Fast, diff-aware mutation testing for TypeScript and JavaScript.

Mutation testing measures whether your tests would actually notice a bug. tzap changes your code in small, realistic ways — flips a comparison, swaps an operator, empties a block — runs your tests against each change, and reports every change they fail to catch. Each survivor is a specific line where a bug could hide from your tests.

It is the TypeScript sibling of jzap, built the same way: StrykerJS as the correctness oracle, every speed feature checked against a slow reference engine, every number reproducible. See docs/status.md for exactly what exists.

npm install --save-dev @huyz0/tzap@next      # the command is tzap; see docs/usage.md#install
npx tzap run                                  # the whole package
npx tzap run --from origin/main --to -Local-  # only the lines this branch changed
Surviving mutants (6):
  src/discount.ts
    line 5: replaced percent > 50 with percent >= 50 [EqualityOperator]
      if (percent > 50) {
    line 12: replaced price === 0 with true [ConditionalExpression]
      return price === 0;
  ...
Mutation score 75.7% (test strength 82.4%, ignoring uncovered mutants)

What it runs

  • Vitest (4.1, 5), Jest 30, node:test, Mocha — your own runner, resolved from your project, driven warm: the code under test loads once and a mutant is a number written to a global. Many mutants run in one invocation of the runner, through each runner's own repeat or retry loop.
  • TypeScript, JavaScript, JSX/TSX, ESM and CommonJS; Vue and Svelte components' scripts.
  • Single packages and monorepos, where a library's mutants are killed by the tests of the packages that use it.

Why it is fast

  • Warm execution: ~40–180 µs per mutant try once a runner is up, against a runner restart per mutant in StrykerJS's Jest path and a re-run of the test files in its Vitest path.
  • Diff-first: a pull request run mutates only the changed lines and runs coverage only for the tests whose imports can reach them.
  • Kill-test-first ordering and early exit in every runner, including Jest.
  • An incremental cache keyed on each test's import closure: nothing changed, no test runs.

Measured on a generated 40-module package against StrykerJS 10 at its fastest setting: 6–7x faster on a full run, 20x on a re-run with nothing changed — and, where tzap does not win by much, it says so: a 10-line diff is 4.5x, a static-heavy package 1.6x. Every number, with its method, is in docs/performance.md.

Why you can trust the verdicts

  • StrykerJS parity: on es-toolkit, superjson and remeda, tzap and StrykerJS agree on 96.6–99.9% of the mutants both generate, and every remaining difference is classified — a StrykerJS limitation, a deliberate difference, or nondeterminism — in tools/parity/parity-baseline.yaml. The gate fails on anything else.
  • A reference engine, one fresh process per mutant with nothing reused, kept forever: every fixture, including one written to break warm engines, gives identical verdicts under both.
  • Warm survivors are confirmed: a survivor whose tests touch module state is re-decided in isolation before it is reported — on superjson, 14 of 82 warm survivors turned out to be masked by state a previous run of the test had left behind.
  • Type-invalid mutants are not gaps: with TypeScript, mutants the type checker rejects are CompileError, outside the score (--typecheck survivors|all|off).

Output

console (default), agent (findings only, for coding agents), json, elements (the mutation-testing-elements schema StrykerJS uses, so its HTML viewer and dashboard work), html, github (annotations), sarif, markdown. Exit codes: 0 met the bar, 1 did not, 2 usage error, 3 the analysis failed.

npx tzap run -r agent -q          # what a coding agent should read
npx tzap run -r html -o reports   # the standard mutation-testing viewer

Documentation

Developing

pnpm install && pnpm build && pnpm test       # every runner, warm against reference
node scripts/pack-smoke.mjs                   # the published package, from its tarball
cd tools/parity && node compare.mjs           # the StrykerJS comparison
node tools/bench/bench.mjs                    # the benchmarks

Licence

Apache License 2.0.