golang-cover-parse

Parse Go coverage to JavaSript object, based on output from lcov-parse

Usage no npm install needed!

<script type="module">
  import golangCoverParse from 'https://cdn.skypack.dev/golang-cover-parse';
</script>

README

golang-cover-parse

Parse Go cover results file to JavaScript Object

The output is based on, and intended to be compatible with, https://github.com/davglass/lcov-parse

Also see:

Use

var gocov = require( "golang-cover-parse" );

// parse by file path
gocov.parseFile( "filepath.out", function( err, result ) { ... } );

// or parse file contents
gocov.parseContent( "...",
    function( err, result ) { ... } );