@friedemannsommer/lcov-parser
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

LCOV parser

A LCOV file parser, written in TypeScript.

npm CI codecov node-current node-lts

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.

Installation

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

or the shorter equivalent:

npm i -DE @friedemannsommer/lcov-parser

Basic usage

string data

import lcovParser from "@friedemannsommer/lcov-parser"

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

Buffer / ArrayBuffer

import lcovParser from "@friedemannsommer/lcov-parser"

const sections = await 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.

Readme

Keywords

Package Sidebar

Install

npm i @friedemannsommer/lcov-parser

Weekly Downloads

31

Version

3.1.1

License

MIT

Unpacked Size

48.3 kB

Total Files

41

Last publish

Collaborators

  • friedemannsommer
  • friedemannsommer-deploy