source: trip-planner-front/node_modules/istanbul-lib-coverage/README.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 996 bytes
Line 
1## istanbul-lib-coverage
2
3[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-lib-coverage.svg)](https://greenkeeper.io/)
4[![Build Status](https://travis-ci.org/istanbuljs/istanbul-lib-coverage.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-lib-coverage)
5
6An API that provides a read-only view of coverage information with the ability
7to merge and summarize coverage info.
8
9Supersedes `object-utils` and `collector` from the v0 istanbul API.
10
11See the docs for the full API.
12
13```js
14var libCoverage = require('istanbul-lib-coverage');
15var map = libCoverage.createCoverageMap(globalCoverageVar);
16var summary = libCoverage.createCoverageSummary();
17
18// merge another coverage map into the one we created
19map.merge(otherCoverageMap);
20
21// inspect and summarize all file coverage objects in the map
22map.files().forEach(function(f) {
23 var fc = map.fileCoverageFor(f),
24 s = fc.toSummary();
25 summary.merge(s);
26});
27
28console.log('Global summary', summary);
29```
Note: See TracBrowser for help on using the repository browser.