Socket
Book a DemoInstallSign in
Socket

istanbul-lib-coverage

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul-lib-coverage

Data library for istanbul coverage objects

Source
npmnpm
Version
3.2.0
Version published
Weekly downloads
48M
-7.06%
Maintainers
4
Weekly downloads
 
Created
Source

istanbul-lib-coverage

Greenkeeper badge Build Status

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.

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);

Keywords

istanbul

FAQs

Package last updated on 18 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts