Socket
Socket
Sign inDemoInstall

byzantine

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byzantine

istanbul coverage json parser


Version published
Weekly downloads
41
decreased by-36.92%
Maintainers
1
Weekly downloads
 
Created
Source

Byzantine

Istanbul json coverage parser

Install

Byzantine expects node 6

yarn add byzantine
# or
npm install byzantine --save

Usage

Byzantine has 2 module: parse and aggregate:

const parse = require('byzantine');
const aggregate = require('byzantine/aggregate');
const json = require('./coverage/coverage-final.json');

// returns Array<Coverage>
const coverages = parse(json);
// returns CoverageAggregate
const { statements, branches, functions } = aggregate(coverages);

The main module (byzantine) returns array of simplified coverage information.

type Coverage {
  path: String
  statements: CoverageData
  branches: CoverageData
  functions: CoverageData
}

type CoverageData {
  covered: Int
  all: Int
}

aggregate returns percentage of coverage for each category in Float, or null for empty array

type CoverageAggregate {
  statements: ?Float
  branches: ?Float
  functions: ?Float
}

License

MIT

Keywords

FAQs

Package last updated on 05 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc