# istanbul-lib-report

> Base reporting library for istanbul

Latest version **3.0.1** (published 2023-07-25) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2023-07-25 |
| First published | 2015-11-22 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/istanbul-lib-report) |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 36.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1103 |
| Author | Krishnan Anantheswaran |
| Maintainers | gotwarlost, bcoe, coreyfarrell, oss-bot |
| Keywords | istanbul, report, api, lib |

## Links

- npm: https://www.npmjs.com/package/istanbul-lib-report
- 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-report

## Dependencies (3)

- [make-dir](https://npm.io/package/make-dir.md) ^4.0.0
- [supports-color](https://npm.io/package/supports-color.md) ^7.1.0
- [istanbul-lib-coverage](https://npm.io/package/istanbul-lib-coverage.md) ^3.0.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2023-07-25
- 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.8 — 2019-04-24
- 2.0.7 — 2019-04-09
- 2.0.6 — 2019-04-03
- 2.0.5 — 2019-03-12
- 2.0.4 — 2019-01-26
- 2.0.3 — 2018-12-25
- 2.0.2 — 2018-09-06
- 1.1.5 — 2018-09-05
- 2.0.1 — 2018-07-07
- 2.0.0 — 2018-06-06
- … 10 more at https://npm.io/package/istanbul-lib-report/versions

## README

# istanbul-lib-report

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

Core reporting utilities for istanbul.

## Example usage

```js
const libReport = require('istanbul-lib-report');
const reports = require('istanbul-reports');

// coverageMap, for instance, obtained from istanbul-lib-coverage
const coverageMap;

const configWatermarks = {
  statements: [50, 80],
  functions: [50, 80],
  branches: [50, 80],
  lines: [50, 80]
};

// create a context for report generation
const context = libReport.createContext({
  dir: 'report/output/dir',
  // The summarizer to default to (may be overridden by some reports)
  // values can be nested/flat/pkg. Defaults to 'pkg'
  defaultSummarizer: 'nested',
  watermarks: configWatermarks,
  coverageMap,
})

// create an instance of the relevant report class, passing the
// report name e.g. json/html/html-spa/text
const report = reports.create('json', {
  skipEmpty: configSkipEmpty,
  skipFull: configSkipFull
})

// call execute to synchronously create and write the report to disk
report.execute(context)
```

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