| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gavin/workspace/happymandarin/node_modules/table/dist/ |
Upload File : |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var cov_ju3qj393e = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawTable.js',
hash = '6094a56cd4ea760b5f41ea29d3e5d124edb7067e',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawTable.js',
statementMap: {
'0': {
start: {
line: 22,
column: 19
},
end: {
line: 22,
column: 30
}
},
'1': {
start: {
line: 24,
column: 2
},
end: {
line: 24,
column: 19
}
},
'2': {
start: {
line: 26,
column: 2
},
end: {
line: 26,
column: 14
}
},
'3': {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
},
'4': {
start: {
line: 29,
column: 4
},
end: {
line: 29,
column: 53
}
},
'5': {
start: {
line: 32,
column: 2
},
end: {
line: 46,
column: 5
}
},
'6': {
start: {
line: 33,
column: 4
},
end: {
line: 33,
column: 35
}
},
'7': {
start: {
line: 35,
column: 4
},
end: {
line: 39,
column: 5
}
},
'8': {
start: {
line: 36,
column: 6
},
end: {
line: 36,
column: 45
}
},
'9': {
start: {
line: 38,
column: 6
},
end: {
line: 38,
column: 21
}
},
'10': {
start: {
line: 41,
column: 4
},
end: {
line: 41,
column: 16
}
},
'11': {
start: {
line: 43,
column: 4
},
end: {
line: 45,
column: 5
}
},
'12': {
start: {
line: 44,
column: 6
},
end: {
line: 44,
column: 56
}
},
'13': {
start: {
line: 48,
column: 2
},
end: {
line: 50,
column: 3
}
},
'14': {
start: {
line: 49,
column: 4
},
end: {
line: 49,
column: 56
}
},
'15': {
start: {
line: 52,
column: 2
},
end: {
line: 52,
column: 16
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 17,
column: 15
},
end: {
line: 17,
column: 16
}
},
loc: {
start: {
line: 17,
column: 84
},
end: {
line: 53,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 32,
column: 18
},
end: {
line: 32,
column: 19
}
},
loc: {
start: {
line: 32,
column: 35
},
end: {
line: 46,
column: 3
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
}, {
start: {
line: 28,
column: 2
},
end: {
line: 30,
column: 3
}
}]
},
'1': {
loc: {
start: {
line: 35,
column: 4
},
end: {
line: 39,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 35,
column: 4
},
end: {
line: 39,
column: 5
}
}, {
start: {
line: 35,
column: 4
},
end: {
line: 39,
column: 5
}
}]
},
'2': {
loc: {
start: {
line: 43,
column: 4
},
end: {
line: 45,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 43,
column: 4
},
end: {
line: 45,
column: 5
}
}, {
start: {
line: 43,
column: 4
},
end: {
line: 45,
column: 5
}
}]
},
'3': {
loc: {
start: {
line: 43,
column: 8
},
end: {
line: 43,
column: 96
}
},
type: 'binary-expr',
locations: [{
start: {
line: 43,
column: 8
},
end: {
line: 43,
column: 23
}
}, {
start: {
line: 43,
column: 27
},
end: {
line: 43,
column: 50
}
}, {
start: {
line: 43,
column: 54
},
end: {
line: 43,
column: 96
}
}]
},
'4': {
loc: {
start: {
line: 48,
column: 2
},
end: {
line: 50,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 48,
column: 2
},
end: {
line: 50,
column: 3
}
}, {
start: {
line: 48,
column: 2
},
end: {
line: 50,
column: 3
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0
},
f: {
'0': 0,
'1': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0, 0],
'4': [0, 0]
}
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
var _drawBorder = require('./drawBorder');
var _drawRow = require('./drawRow');
var _drawRow2 = _interopRequireDefault(_drawRow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @param {Array} rows
* @param {Object} border
* @param {Array} columnSizeIndex
* @param {Array} rowSpanIndex
* @param {Function} drawHorizontalLine
* @returns {string}
*/
exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
++cov_ju3qj393e.f[0];
let output, realRowIndex, rowHeight;
const rowCount = (++cov_ju3qj393e.s[0], rows.length);
++cov_ju3qj393e.s[1];
realRowIndex = 0;
++cov_ju3qj393e.s[2];
output = '';
++cov_ju3qj393e.s[3];
if (drawHorizontalLine(realRowIndex, rowCount)) {
++cov_ju3qj393e.b[0][0];
++cov_ju3qj393e.s[4];
output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border);
} else {
++cov_ju3qj393e.b[0][1];
}
++cov_ju3qj393e.s[5];
_lodash2.default.forEach(rows, (row, index0) => {
++cov_ju3qj393e.f[1];
++cov_ju3qj393e.s[6];
output += (0, _drawRow2.default)(row, border);
++cov_ju3qj393e.s[7];
if (!rowHeight) {
++cov_ju3qj393e.b[1][0];
++cov_ju3qj393e.s[8];
rowHeight = rowSpanIndex[realRowIndex];
++cov_ju3qj393e.s[9];
realRowIndex++;
} else {
++cov_ju3qj393e.b[1][1];
}
++cov_ju3qj393e.s[10];
rowHeight--;
++cov_ju3qj393e.s[11];
if ((++cov_ju3qj393e.b[3][0], rowHeight === 0) && (++cov_ju3qj393e.b[3][1], index0 !== rowCount - 1) && (++cov_ju3qj393e.b[3][2], drawHorizontalLine(realRowIndex, rowCount))) {
++cov_ju3qj393e.b[2][0];
++cov_ju3qj393e.s[12];
output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
} else {
++cov_ju3qj393e.b[2][1];
}
});
++cov_ju3qj393e.s[13];
if (drawHorizontalLine(realRowIndex, rowCount)) {
++cov_ju3qj393e.b[4][0];
++cov_ju3qj393e.s[14];
output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border);
} else {
++cov_ju3qj393e.b[4][1];
}
++cov_ju3qj393e.s[15];
return output;
};
module.exports = exports['default'];