From 7fff4499fd915bcea3fa93b1aa8b35f4fe7a6027 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 00:38:50 +0200 Subject: add linting (and some initial fixes) --- node_modules/istanbul-reports/lib/lcov/index.js | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 node_modules/istanbul-reports/lib/lcov/index.js (limited to 'node_modules/istanbul-reports/lib/lcov') diff --git a/node_modules/istanbul-reports/lib/lcov/index.js b/node_modules/istanbul-reports/lib/lcov/index.js new file mode 100644 index 000000000..97e34c977 --- /dev/null +++ b/node_modules/istanbul-reports/lib/lcov/index.js @@ -0,0 +1,29 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +var LcovOnlyReport = require('../lcovonly'), + HtmlReport = require('../html'); + +function LcovReport() { + this.lcov = new LcovOnlyReport({file: 'lcov.info'}); + this.html = new HtmlReport({ subdir: 'lcov-report'}); +} + +['Start', 'End', 'Summary', 'SummaryEnd', 'Detail'].forEach(function (what) { + var meth = 'on' + what; + LcovReport.prototype[meth] = function () { + var args = Array.prototype.slice.call(arguments), + lcov = this.lcov, + html = this.html; + + if (lcov[meth]) { + lcov[meth].apply(lcov, args); + } + if (html[meth]) { + html[meth].apply(html, args); + } + }; +}); + +module.exports = LcovReport; -- cgit v1.2.3