HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/zaklada/html/node_modules/istanbul/lib/report/text-lcov.js
var LcovOnly = require('./lcovonly'),
  util = require('util');

/**
 * a `Report` implementation that produces an LCOV coverage and prints it
 *  to standard out.
 *
 * Usage
 * -----
 *
 *      var report = require('istanbul').Report.create('text-lcov');
 *
 * @class TextLcov
 * @module report
 * @extends LcovOnly
 * @constructor
 * @param {Object} opts optional
 * @param {String} [opts.log] the method used to log to console.
 */
function TextLcov(opts) {
    var that = this;

    LcovOnly.call(this);

    this.opts = opts || {};
    this.opts.log = this.opts.log || console.log;
    this.opts.writer = {
        println: function (ln) {
            that.opts.log(ln);
        }
    };
}

TextLcov.TYPE = 'text-lcov';
util.inherits(TextLcov, LcovOnly);

LcovOnly.super_.mix(TextLcov, {
    writeReport: function (collector) {
        var that = this,
            writer = this.opts.writer;

        collector.files().forEach(function (key) {
            that.writeFileCoverage(writer, collector.fileCoverageFor(key));
        });

        this.emit('done');
    }
});

module.exports = TextLcov;