clover-json
Parse clover report files, and return a JSON representation in a lcov-parse compatible manner.
Installation
$ npm i @cvrg-report/clover-json --save
Usage
var clover = require("@cvrg-report/clover-json");
clover.parseFile("filepath.xml")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});
clover.parseContent("<?xml version=\"1.0\" ?><coverage>...</coverage>")
.then(function (result) {
console.log(JSON.stringify(result));
}).catch(function (err) {
console.error(err);
});