# istanbul-lib-coverage

> Data library for istanbul coverage objects

Latest version **3.2.2** (published 2023-11-08) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## Health

**Score 33/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.2.2 |
| Published | 2023-11-08 |
| First published | 2015-11-21 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/istanbul-lib-coverage) |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 33.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1103 |
| Author | Krishnan Anantheswaran |
| Maintainers | gotwarlost, bcoe, coreyfarrell, oss-bot |
| Keywords | istanbul, coverage, data |

## Links

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

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 3.2.2 (latest) — 2023-11-08
- 3.2.1 — 2023-11-06
- 3.2.0 — 2021-10-18
- 3.1.0 — 2021-10-17
- 3.0.2 — 2021-10-11
- 3.0.1 — 2021-09-23
- 3.0.0 — 2019-12-20
- 3.0.0-alpha.2 — 2019-12-07
- 3.0.0-alpha.1 — 2019-10-06
- 3.0.0-alpha.0 — 2019-06-19
- 2.0.5 — 2019-04-24
- 2.0.4 — 2019-03-12
- 2.0.3 — 2019-01-26
- 2.0.2 — 2018-12-25
- 1.2.1 — 2018-09-05
- … 14 more at https://npm.io/package/istanbul-lib-coverage/versions

## README

## istanbul-lib-coverage

[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-lib-coverage.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-coverage.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-coverage)

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
var libCoverage = require('istanbul-lib-coverage');
var map = libCoverage.createCoverageMap(globalCoverageVar);
var 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
map.files().forEach(function(f) {
    var fc = map.fileCoverageFor(f),
        s = fc.toSummary();
    summary.merge(s);
});

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

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