Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

__tests__/__snapshots__/aggregate.test.js.snap

7

package.json
{
"name": "byzantine",
"version": "1.0.0",
"version": "1.1.0",
"description": "istanbul coverage json parser",

@@ -28,3 +28,6 @@ "main": "index.js",

},
"homepage": "https://github.com/pveyes/byzantine#readme"
"homepage": "https://github.com/pveyes/byzantine#readme",
"devDependencies": {
"jest": "^21.2.1"
}
}
# Byzantine
> Istanbul json coverage parser
## Install
Byzantine expects node 6
```sh
yarn add byzantine
# or
npm install byzantine --save
```
## Usage
Byzantine has 2 module: `parse` and `aggregate`:
```js
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.
```js
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
```js
type CoverageAggregate {
statements: ?Float
branches: ?Float
functions: ?Float
}
```
## License
MIT
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