@cvrg-report/clover-json

0.3.3 • Public • Published

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

// Parse by file path
clover.parseFile("filepath.xml")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

// Parse by file contents
clover.parseContent("<?xml version=\"1.0\" ?><coverage>...</coverage>")
    .then(function (result) {
        console.log(JSON.stringify(result));
    }).catch(function (err) {
        console.error(err);
    });

Package Sidebar

Install

npm i @cvrg-report/clover-json

Weekly Downloads

8,771

Version

0.3.3

License

MIT

Unpacked Size

6.46 kB

Total Files

4

Last publish

Collaborators

  • tobilg