Socket
Socket
Sign inDemoInstall

istanbul-lib-coverage

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul-lib-coverage - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/istanbuljs/istanbul-lib-coverage/compare/istanbul-lib-coverage@1.0.2...istanbul-lib-coverage@1.1.0) (2017-04-29)
### Bug Fixes
* getBranchCoverageByLine() was looking for line coverage using wrong object structure ([bf36658](https://github.com/istanbuljs/istanbul-lib-coverage/commit/bf36658))
### Features
* add possibility to filter coverage maps when running reports post-hoc ([#24](https://github.com/istanbuljs/istanbuljs/issues/24)) ([e1c99d6](https://github.com/istanbuljs/istanbul-lib-coverage/commit/e1c99d6))
<a name="1.0.2"></a>

@@ -8,0 +24,0 @@ ## [1.0.2](https://github.com/istanbuljs/istanbul-lib-coverage/compare/istanbul-lib-coverage@1.0.1...istanbul-lib-coverage@1.0.2) (2017-03-27)

@@ -61,2 +61,16 @@ /*

/**
* filter the coveragemap based on the callback provided
* @param {Function (filename)} callback - Returns true if the path
* should be included in the coveragemap. False if it should be
* removed.
*/
CoverageMap.prototype.filter = function (callback) {
var that = this;
Object.keys(that.data).forEach(function (k) {
if (!callback(k)) {
delete that.data[k];
}
});
};
/**
* returns a JSON-serializable POJO for this coverage map

@@ -63,0 +77,0 @@ * @returns {Object}

2

lib/file.js

@@ -207,3 +207,3 @@ /*

Object.keys(branchMap).forEach(function (k) {
var line = branchMap[k].line,
var line = branchMap[k].line || branchMap[k].loc.start.line,
branchData = branches[k];

@@ -210,0 +210,0 @@ ret[line] = ret[line] || [];

{
"name": "istanbul-lib-coverage",
"version": "1.0.2",
"version": "1.1.0",
"description": "Data library for istanbul coverage objects",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "index.js",
"files": [
"lib",
"index.js"
],
"scripts": {

@@ -8,0 +12,0 @@ "pretest": "jshint index.js lib/ test/",

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