# @vitest/istanbul-lib-coverage

> Data library for istanbul coverage objects

Latest version **1.0.1** (published 2026-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vitest/istanbul-lib-coverage
pnpm add @vitest/istanbul-lib-coverage
yarn add @vitest/istanbul-lib-coverage
bun add @vitest/istanbul-lib-coverage
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-08-31 |
| First published | 2026-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 22.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Author | Vitest Team |
| Maintainers | ariperkkio, antfu, hiogawa, oreanno, yyx990803 |
| Keywords | coverage, data, istanbul, vitest |

## Links

- npm: https://www.npmjs.com/package/@vitest/istanbul-lib-coverage
- Repository: https://github.com/vitest-dev/istanbuljs
- Homepage: https://vitest.dev/
- Issues: https://github.com/vitest-dev/vitest/issues
- npm.io page: https://npm.io/package/@vitest/istanbul-lib-coverage

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2026-08-31
- 1.0.0 — 2026-08-25
- 0.0.4 — 2026-08-25
- 0.0.3 — 2026-08-24
- 0.0.2 — 2026-08-24
- 0.0.1 — 2026-08-24

## README

# @vitest/istanbul-lib-coverage

[![Build Status](https://img.shields.io/github/actions/workflow/status/vitest-dev/istanbuljs/ci.yml?label=CI&logo=GitHub)](https://github.com/vitest-dev/istanbuljs/actions/workflows/ci.yml)

An API that provides a read-only view of coverage information with the ability
to merge and summarize coverage info.

Supersedes `object-utils` and `collector` from the v0 istanbul API.

See the docs for the full API.

```js
import * as libCoverage from "@vitest/istanbul-lib-coverage";

const map = libCoverage.createCoverageMap(globalCoverageVar);
const summary = libCoverage.createCoverageSummary();

// merge another coverage map into the one we created
map.merge(otherCoverageMap);

// inspect and summarize all file coverage objects in the map
for (const f of map.files()) {
  const fc = map.fileCoverageFor(f);
  summary.merge(fc.toSummary());
}

console.log("Global summary", summary);
```

---
_Source: https://npm.io/package/@vitest/istanbul-lib-coverage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
