LCOV parser
    Preparing search index...

    LCOV parser

    LCOV parser

    A LCOV file parser, written in TypeScript.

    npm CI codecov node-current

    This parser is built for the LCOV trace file format, which can be found here: github.com/linux-test-project/lcov/man/geninfo.1.

    You're able to use different field names, if necessary.

    npm install --save-dev --save-exact @friedemannsommer/lcov-parser
    

    or the shorter equivalent:

    npm i -DE @friedemannsommer/lcov-parser
    

    string data

    import lcovParser from "@friedemannsommer/lcov-parser/sync"

    const sections = lcovParser({ from: "<LCOV data>" })

    Buffer / ArrayBuffer

    import lcovParser from "@friedemannsommer/lcov-parser/sync"

    const sections = lcovParser({ from: Buffer.from("<LCOV data>") })

    Readable streams

    import lcovParser from "@friedemannsommer/lcov-parser"
    import {createReadStream} from "node:fs"

    const lcovFile = createReadStream(new URL("path/to/lcov.info", import.meta.url))
    const sections = await lcovParser({ from: lcovFile })

    For more details, take a look at the documentation, which can be found here: friedemannsommer.github.io/lcov-parser.