esnext-coverage-analytics
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -6,25 +6,39 @@ 'use strict'; | ||
}); | ||
exports.tags = exports.lines = exports.metrics = exports.filter = undefined; | ||
var _filter2 = require('./filter'); | ||
var _filter = require('./filter'); | ||
var _filter3 = _interopRequireDefault(_filter2); | ||
Object.defineProperty(exports, 'filter', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_filter).default; | ||
} | ||
}); | ||
var _metrics2 = require('./metrics'); | ||
var _metrics = require('./metrics'); | ||
var _metrics3 = _interopRequireDefault(_metrics2); | ||
Object.defineProperty(exports, 'metrics', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_metrics).default; | ||
} | ||
}); | ||
var _lines2 = require('./lines'); | ||
var _lines = require('./lines'); | ||
var _lines3 = _interopRequireDefault(_lines2); | ||
Object.defineProperty(exports, 'lines', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_lines).default; | ||
} | ||
}); | ||
var _tags2 = require('./tags'); | ||
var _tags = require('./tags'); | ||
var _tags3 = _interopRequireDefault(_tags2); | ||
Object.defineProperty(exports, 'tags', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_tags).default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.filter = _filter3.default; | ||
exports.metrics = _metrics3.default; | ||
exports.lines = _lines3.default; | ||
exports.tags = _tags3.default; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,5 +7,2 @@ Object.defineProperty(exports, "__esModule", { | ||
exports.default = metrics; | ||
var _lines = require('./lines'); | ||
/** | ||
@@ -24,11 +21,2 @@ * Compute coverage metrics from the given locations. | ||
return { covered: covered, total: total }; | ||
} | ||
/** | ||
* Compute coverage metrics for lines of the given locations. | ||
* @param {Array} locations – Existing coverage data locations. | ||
* @return {Object} Metrics. | ||
*/ | ||
metrics.line = function lineMetrics(locations) { | ||
return metrics(locations.filter(_lines.isLine)); | ||
}; | ||
} |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -7,2 +7,5 @@ Object.defineProperty(exports, "__esModule", { | ||
exports.default = tags; | ||
var _lines = require('./lines'); | ||
/** | ||
@@ -22,3 +25,4 @@ * Generate a tag index from coverage data. | ||
locations.forEach(function (location) { | ||
location.tags.forEach(function (tag) { | ||
var locationTags = tagIndex.line && (0, _lines.isLine)(location) ? location.tags.concat('line') : location.tags; | ||
locationTags.forEach(function (tag) { | ||
if (tagIndex.hasOwnProperty(tag)) { | ||
@@ -25,0 +29,0 @@ tagIndex[tag].push(location); |
{ | ||
"name": "esnext-coverage-analytics", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Analytics package for esnext-coverage", | ||
@@ -8,2 +8,3 @@ "repository": "esnext-coverage/esnext-coverage-analytics", | ||
"keywords": [ | ||
"esnext-coverage", | ||
"coverage", | ||
@@ -14,3 +15,3 @@ "esnext" | ||
"lint": "eslint {src,test}/**/*.js", | ||
"test": "NODE_ENV=test ./node_modules/.bin/_mocha --slow 200 --compilers js:babel-core/register -R spec test/spec", | ||
"test": "mocha --slow 200 -r babel-register test/spec/*.spec.js", | ||
"transpile": "babel src --out-dir dist", | ||
@@ -30,12 +31,9 @@ "prepublish": "npm run lint && npm test && npm run transpile" | ||
"devDependencies": { | ||
"babel-cli": "^6.9.0", | ||
"babel-eslint": "^6.0.4", | ||
"babel-plugin-transform-export-extensions": "^6.8.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-cli": "^6.14.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"chai": "^3.5.0", | ||
"eslint": "^2.11.1", | ||
"eslint": "^3.4.0", | ||
"eslint-config-meetic": "^2.0.0", | ||
"eslint-plugin-babel": "^3.2.0", | ||
"mocha": "^2.5.3" | ||
"mocha": "^3.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
153
6388