basant307/AI_Governance_Project
045
1## istanbul-lib-coverage2 3[](https://greenkeeper.io/)4[](https://travis-ci.org/istanbuljs/istanbul-lib-coverage)5 6An API that provides a read-only view of coverage information with the ability7to 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```js14var libCoverage = require('istanbul-lib-coverage');15var map = libCoverage.createCoverageMap(globalCoverageVar);16var summary = libCoverage.createCoverageSummary();17 18// merge another coverage map into the one we created19map.merge(otherCoverageMap);20 21// inspect and summarize all file coverage objects in the map22map.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```30 