CheckOps home

Tools directory

N

CheckOps

nyc (Istanbul)

nyc is the ISC-licensed command-line interface for Istanbul, the long-standing JavaScript code coverage tool that instruments code to report line, branch, function and statement coverage.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

nyc is the command-line interface for Istanbul, the most widely used JavaScript coverage instrumenter. It instruments your source code so that running tests records which statements, branches, functions and lines executed, then produces reports with Istanbul’s reporters. Many frameworks, including Jest, use Istanbul internally.

Run nyc mocha (or any test command) and nyc wraps the subprocesses. Configuration in .nycrc or package.json controls include/exclude, all (to include untested files), reporters (text, HTML, lcov and more), and check-coverage thresholds. Source maps and Babel integration (babel-plugin-istanbul) support transpiled code. The latest release, nyc 18.0.0, was published on 22 February 2026, though development is slower than c8.

The source code is at istanbuljs/nyc on GitHub under the ISC licence, with about 5,800 stars; the most recent commit was on 17 May 2026.

In CI, nyc’s lcov output is the usual input for coverage services such as Codecov and Coveralls.

Features

  1. Mature instrumentation: Accurate statement, branch, function and line coverage.
  2. Wraps any runner: nyc <command>.
  3. Many reporters: text, HTML, lcov, Cobertura and more.
  4. Thresholds: Fail builds when coverage drops.

Pros

  1. Free to use: Open source under the ISC licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 17 May 2026.
  3. Community: About 5,800 GitHub stars.

Cons

  1. Instrumentation overhead: Slower than native V8 coverage.
  2. ESM friction: Modern ESM projects often find c8 simpler.
npm install --save-dev nyc
npx nyc --reporter=html --reporter=text mocha

.nycrc.json:

{ "all": true, "include": ["src/**/*.js"], "check-coverage": true, "branches": 80, "lines": 85 }

Resources:

Pricing

nyc (Istanbul) is free and open source under the ISC licence.

  1. Existing projects already using nyc or Babel-instrumented builds.
  2. Teams needing Istanbul’s instrumentation model for specific tooling.

Conclusion

nyc is the classic Istanbul CLI and still reliable; for new ESM-first projects, c8 is often the lighter choice.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with nyc (Istanbul) side by side.