Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

table

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

table - npm Package Compare versions

Comparing version 3.8.2 to 3.8.3

839

dist/alignString.js

@@ -7,755 +7,2 @@ 'use strict';

var cov_x1qtw309s = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/alignString.js',
hash = '4739a846b3e706274c1282ad93f4da2a2e3aebc9',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/alignString.js',
statementMap: {
'0': {
start: {
line: 4,
column: 19
},
end: {
line: 8,
column: 1
}
},
'1': {
start: {
line: 15,
column: 18
},
end: {
line: 17,
column: 1
}
},
'2': {
start: {
line: 16,
column: 2
},
end: {
line: 16,
column: 40
}
},
'3': {
start: {
line: 24,
column: 19
},
end: {
line: 26,
column: 1
}
},
'4': {
start: {
line: 25,
column: 2
},
end: {
line: 25,
column: 40
}
},
'5': {
start: {
line: 33,
column: 20
},
end: {
line: 45,
column: 1
}
},
'6': {
start: {
line: 36,
column: 2
},
end: {
line: 36,
column: 24
}
},
'7': {
start: {
line: 38,
column: 2
},
end: {
line: 44,
column: 3
}
},
'8': {
start: {
line: 39,
column: 4
},
end: {
line: 39,
column: 73
}
},
'9': {
start: {
line: 41,
column: 4
},
end: {
line: 41,
column: 35
}
},
'10': {
start: {
line: 43,
column: 4
},
end: {
line: 43,
column: 77
}
},
'11': {
start: {
line: 57,
column: 2
},
end: {
line: 59,
column: 3
}
},
'12': {
start: {
line: 58,
column: 4
},
end: {
line: 58,
column: 65
}
},
'13': {
start: {
line: 61,
column: 2
},
end: {
line: 63,
column: 3
}
},
'14': {
start: {
line: 62,
column: 4
},
end: {
line: 62,
column: 73
}
},
'15': {
start: {
line: 65,
column: 23
},
end: {
line: 65,
column: 43
}
},
'16': {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
},
'17': {
start: {
line: 70,
column: 4
},
end: {
line: 70,
column: 97
}
},
'18': {
start: {
line: 73,
column: 2
},
end: {
line: 75,
column: 3
}
},
'19': {
start: {
line: 74,
column: 4
},
end: {
line: 74,
column: 67
}
},
'20': {
start: {
line: 77,
column: 2
},
end: {
line: 79,
column: 3
}
},
'21': {
start: {
line: 78,
column: 4
},
end: {
line: 78,
column: 114
}
},
'22': {
start: {
line: 81,
column: 2
},
end: {
line: 83,
column: 3
}
},
'23': {
start: {
line: 82,
column: 4
},
end: {
line: 82,
column: 41
}
},
'24': {
start: {
line: 85,
column: 25
},
end: {
line: 85,
column: 54
}
},
'25': {
start: {
line: 87,
column: 2
},
end: {
line: 89,
column: 3
}
},
'26': {
start: {
line: 88,
column: 4
},
end: {
line: 88,
column: 46
}
},
'27': {
start: {
line: 91,
column: 2
},
end: {
line: 93,
column: 3
}
},
'28': {
start: {
line: 92,
column: 4
},
end: {
line: 92,
column: 47
}
},
'29': {
start: {
line: 95,
column: 2
},
end: {
line: 95,
column: 46
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 15,
column: 18
},
end: {
line: 15,
column: 19
}
},
loc: {
start: {
line: 15,
column: 38
},
end: {
line: 17,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 24,
column: 19
},
end: {
line: 24,
column: 20
}
},
loc: {
start: {
line: 24,
column: 39
},
end: {
line: 26,
column: 1
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 33,
column: 20
},
end: {
line: 33,
column: 21
}
},
loc: {
start: {
line: 33,
column: 40
},
end: {
line: 45,
column: 1
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 56,
column: 15
},
end: {
line: 56,
column: 16
}
},
loc: {
start: {
line: 56,
column: 55
},
end: {
line: 96,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 38,
column: 2
},
end: {
line: 44,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 38,
column: 2
},
end: {
line: 44,
column: 3
}
}, {
start: {
line: 38,
column: 2
},
end: {
line: 44,
column: 3
}
}]
},
'1': {
loc: {
start: {
line: 57,
column: 2
},
end: {
line: 59,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 57,
column: 2
},
end: {
line: 59,
column: 3
}
}, {
start: {
line: 57,
column: 2
},
end: {
line: 59,
column: 3
}
}]
},
'2': {
loc: {
start: {
line: 61,
column: 2
},
end: {
line: 63,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 61,
column: 2
},
end: {
line: 63,
column: 3
}
}, {
start: {
line: 61,
column: 2
},
end: {
line: 63,
column: 3
}
}]
},
'3': {
loc: {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
}, {
start: {
line: 67,
column: 2
},
end: {
line: 71,
column: 3
}
}]
},
'4': {
loc: {
start: {
line: 73,
column: 2
},
end: {
line: 75,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 73,
column: 2
},
end: {
line: 75,
column: 3
}
}, {
start: {
line: 73,
column: 2
},
end: {
line: 75,
column: 3
}
}]
},
'5': {
loc: {
start: {
line: 77,
column: 2
},
end: {
line: 79,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 77,
column: 2
},
end: {
line: 79,
column: 3
}
}, {
start: {
line: 77,
column: 2
},
end: {
line: 79,
column: 3
}
}]
},
'6': {
loc: {
start: {
line: 81,
column: 2
},
end: {
line: 83,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 81,
column: 2
},
end: {
line: 83,
column: 3
}
}, {
start: {
line: 81,
column: 2
},
end: {
line: 83,
column: 3
}
}]
},
'7': {
loc: {
start: {
line: 87,
column: 2
},
end: {
line: 89,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 87,
column: 2
},
end: {
line: 89,
column: 3
}
}, {
start: {
line: 87,
column: 2
},
end: {
line: 89,
column: 3
}
}]
},
'8': {
loc: {
start: {
line: 91,
column: 2
},
end: {
line: 93,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 91,
column: 2
},
end: {
line: 93,
column: 3
}
}, {
start: {
line: 91,
column: 2
},
end: {
line: 93,
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,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [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');

@@ -771,3 +18,3 @@

const alignments = (++cov_x1qtw309s.s[0], ['left', 'right', 'center']);
const alignments = ['left', 'right', 'center'];

@@ -779,8 +26,5 @@ /**

*/
const alignLeft = (++cov_x1qtw309s.s[1], (subject, width) => {
++cov_x1qtw309s.f[0];
++cov_x1qtw309s.s[2];
const alignLeft = (subject, width) => {
return subject + _lodash2.default.repeat(' ', width);
});
};

@@ -792,8 +36,5 @@ /**

*/
const alignRight = (++cov_x1qtw309s.s[3], (subject, width) => {
++cov_x1qtw309s.f[1];
++cov_x1qtw309s.s[4];
const alignRight = (subject, width) => {
return _lodash2.default.repeat(' ', width) + subject;
});
};

@@ -805,26 +46,15 @@ /**

*/
const alignCenter = (++cov_x1qtw309s.s[5], (subject, width) => {
++cov_x1qtw309s.f[2];
const alignCenter = (subject, width) => {
let halfWidth;
++cov_x1qtw309s.s[6];
halfWidth = width / 2;
++cov_x1qtw309s.s[7];
if (halfWidth % 2 === 0) {
++cov_x1qtw309s.b[0][0];
++cov_x1qtw309s.s[8];
return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth);
} else {
++cov_x1qtw309s.b[0][1];
++cov_x1qtw309s.s[9];
halfWidth = _lodash2.default.floor(halfWidth);
++cov_x1qtw309s.s[10];
return _lodash2.default.repeat(' ', halfWidth) + subject + _lodash2.default.repeat(' ', halfWidth + 1);
}
});
};

@@ -842,91 +72,40 @@ /**

exports.default = (subject, containerWidth, alignment) => {
++cov_x1qtw309s.f[3];
++cov_x1qtw309s.s[11];
if (!_lodash2.default.isString(subject)) {
++cov_x1qtw309s.b[1][0];
++cov_x1qtw309s.s[12];
throw new Error('Subject parameter value must be a string.');
} else {
++cov_x1qtw309s.b[1][1];
}
++cov_x1qtw309s.s[13];
if (!_lodash2.default.isNumber(containerWidth)) {
++cov_x1qtw309s.b[2][0];
++cov_x1qtw309s.s[14];
throw new Error('Container width parameter value must be a number.');
} else {
++cov_x1qtw309s.b[2][1];
}
const subjectWidth = (++cov_x1qtw309s.s[15], (0, _stringWidth2.default)(subject));
const subjectWidth = (0, _stringWidth2.default)(subject);
++cov_x1qtw309s.s[16];
if (subjectWidth > containerWidth) {
++cov_x1qtw309s.b[3][0];
++cov_x1qtw309s.s[17];
// console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject);
throw new Error('Subject parameter value width cannot be greater than the container width.');
} else {
++cov_x1qtw309s.b[3][1];
}
++cov_x1qtw309s.s[18];
if (!_lodash2.default.isString(alignment)) {
++cov_x1qtw309s.b[4][0];
++cov_x1qtw309s.s[19];
throw new Error('Alignment parameter value must be a string.');
} else {
++cov_x1qtw309s.b[4][1];
}
++cov_x1qtw309s.s[20];
if (alignments.indexOf(alignment) === -1) {
++cov_x1qtw309s.b[5][0];
++cov_x1qtw309s.s[21];
throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).');
} else {
++cov_x1qtw309s.b[5][1];
}
++cov_x1qtw309s.s[22];
if (subjectWidth === 0) {
++cov_x1qtw309s.b[6][0];
++cov_x1qtw309s.s[23];
return _lodash2.default.repeat(' ', containerWidth);
} else {
++cov_x1qtw309s.b[6][1];
}
const availableWidth = (++cov_x1qtw309s.s[24], containerWidth - subjectWidth);
const availableWidth = containerWidth - subjectWidth;
++cov_x1qtw309s.s[25];
if (alignment === 'left') {
++cov_x1qtw309s.b[7][0];
++cov_x1qtw309s.s[26];
return alignLeft(subject, availableWidth);
} else {
++cov_x1qtw309s.b[7][1];
}
++cov_x1qtw309s.s[27];
if (alignment === 'right') {
++cov_x1qtw309s.b[8][0];
++cov_x1qtw309s.s[28];
return alignRight(subject, availableWidth);
} else {
++cov_x1qtw309s.b[8][1];
}
++cov_x1qtw309s.s[29];
return alignCenter(subject, availableWidth);

@@ -933,0 +112,0 @@ };

@@ -7,203 +7,2 @@ 'use strict';

var cov_2pktuqk92z = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/alignTableData.js',
hash = '913eacde8fc43c298d627dea94c57331a147b681',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/alignTableData.js',
statementMap: {
'0': {
start: {
line: 11,
column: 2
},
end: {
line: 21,
column: 5
}
},
'1': {
start: {
line: 12,
column: 4
},
end: {
line: 20,
column: 7
}
},
'2': {
start: {
line: 13,
column: 21
},
end: {
line: 13,
column: 43
}
},
'3': {
start: {
line: 15,
column: 6
},
end: {
line: 19,
column: 7
}
},
'4': {
start: {
line: 16,
column: 8
},
end: {
line: 16,
column: 21
}
},
'5': {
start: {
line: 18,
column: 8
},
end: {
line: 18,
column: 66
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 16
}
},
loc: {
start: {
line: 10,
column: 33
},
end: {
line: 22,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 11,
column: 21
},
end: {
line: 11,
column: 22
}
},
loc: {
start: {
line: 11,
column: 32
},
end: {
line: 21,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 12,
column: 24
},
end: {
line: 12,
column: 25
}
},
loc: {
start: {
line: 12,
column: 43
},
end: {
line: 20,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 15,
column: 6
},
end: {
line: 19,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 15,
column: 6
},
end: {
line: 19,
column: 7
}
}, {
start: {
line: 15,
column: 6
},
end: {
line: 19,
column: 7
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {
'0': [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');

@@ -229,24 +28,9 @@

exports.default = (rows, config) => {
++cov_2pktuqk92z.f[0];
++cov_2pktuqk92z.s[0];
return _lodash2.default.map(rows, cells => {
++cov_2pktuqk92z.f[1];
++cov_2pktuqk92z.s[1];
return _lodash2.default.map(cells, (value, index1) => {
++cov_2pktuqk92z.f[2];
const column = config.columns[index1];
const column = (++cov_2pktuqk92z.s[2], config.columns[index1]);
++cov_2pktuqk92z.s[3];
if ((0, _stringWidth2.default)(value) === column.width) {
++cov_2pktuqk92z.b[0][0];
++cov_2pktuqk92z.s[4];
return value;
} else {
++cov_2pktuqk92z.b[0][1];
++cov_2pktuqk92z.s[5];
return (0, _alignString2.default)(value, column.width, column.alignment);

@@ -253,0 +37,0 @@ }

@@ -7,311 +7,2 @@ 'use strict';

var cov_o4tfba3lv = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellHeight.js',
hash = 'a65906da9699d691d072da9a76fc1ac18702e1f5',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellHeight.js',
statementMap: {
'0': {
start: {
line: 12,
column: 2
},
end: {
line: 14,
column: 3
}
},
'1': {
start: {
line: 13,
column: 4
},
end: {
line: 13,
column: 47
}
},
'2': {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
},
'3': {
start: {
line: 17,
column: 4
},
end: {
line: 17,
column: 56
}
},
'4': {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
},
'5': {
start: {
line: 21,
column: 4
},
end: {
line: 21,
column: 60
}
},
'6': {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
'7': {
start: {
line: 25,
column: 4
},
end: {
line: 25,
column: 47
}
},
'8': {
start: {
line: 28,
column: 2
},
end: {
line: 28,
column: 50
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 11,
column: 15
},
end: {
line: 11,
column: 16
}
},
loc: {
start: {
line: 11,
column: 60
},
end: {
line: 29,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 11,
column: 36
},
end: {
line: 11,
column: 55
}
},
type: 'default-arg',
locations: [{
start: {
line: 11,
column: 50
},
end: {
line: 11,
column: 55
}
}]
},
'1': {
loc: {
start: {
line: 12,
column: 2
},
end: {
line: 14,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 12,
column: 2
},
end: {
line: 14,
column: 3
}
}, {
start: {
line: 12,
column: 2
},
end: {
line: 14,
column: 3
}
}]
},
'2': {
loc: {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
}, {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
}]
},
'3': {
loc: {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
}, {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
}]
},
'4': {
loc: {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}, {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0
},
f: {
'0': 0
},
b: {
'0': [0],
'1': [0, 0],
'2': [0, 0],
'3': [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');

@@ -338,46 +29,20 @@

exports.default = function (value, columnWidth) {
let useWrapWord = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (++cov_o4tfba3lv.b[0][0], false);
++cov_o4tfba3lv.f[0];
++cov_o4tfba3lv.s[0];
let useWrapWord = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (!_lodash2.default.isString(value)) {
++cov_o4tfba3lv.b[1][0];
++cov_o4tfba3lv.s[1];
throw new Error('Value must be a string.');
} else {
++cov_o4tfba3lv.b[1][1];
}
++cov_o4tfba3lv.s[2];
if (!_lodash2.default.isInteger(columnWidth)) {
++cov_o4tfba3lv.b[2][0];
++cov_o4tfba3lv.s[3];
throw new Error('Column width must be an integer.');
} else {
++cov_o4tfba3lv.b[2][1];
}
++cov_o4tfba3lv.s[4];
if (columnWidth < 1) {
++cov_o4tfba3lv.b[3][0];
++cov_o4tfba3lv.s[5];
throw new Error('Column width must be greater than 0.');
} else {
++cov_o4tfba3lv.b[3][1];
}
++cov_o4tfba3lv.s[6];
if (useWrapWord) {
++cov_o4tfba3lv.b[4][0];
++cov_o4tfba3lv.s[7];
return (0, _wrapWord2.default)(value, columnWidth).length;
} else {
++cov_o4tfba3lv.b[4][1];
}
++cov_o4tfba3lv.s[8];
return _lodash2.default.ceil((0, _stringWidth2.default)(value) / columnWidth);

@@ -384,0 +49,0 @@ };

@@ -7,100 +7,2 @@ 'use strict';

var cov_1fd7vh0l3t = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellWidthIndex.js',
hash = 'b9600d2c169ef60a6ea737b6fcbbb85c260df86f',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateCellWidthIndex.js',
statementMap: {
'0': {
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 5
}
},
'1': {
start: {
line: 12,
column: 4
},
end: {
line: 12,
column: 30
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 16
}
},
loc: {
start: {
line: 10,
column: 26
},
end: {
line: 14,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 11,
column: 22
},
end: {
line: 11,
column: 23
}
},
loc: {
start: {
line: 11,
column: 33
},
end: {
line: 13,
column: 3
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0
},
f: {
'0': 0,
'1': 0
},
b: {}
},
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');

@@ -123,9 +25,3 @@

exports.default = cells => {
++cov_1fd7vh0l3t.f[0];
++cov_1fd7vh0l3t.s[0];
return _lodash2.default.map(cells, value => {
++cov_1fd7vh0l3t.f[1];
++cov_1fd7vh0l3t.s[1];
return (0, _stringWidth2.default)(value);

@@ -132,0 +28,0 @@ });

@@ -7,269 +7,2 @@ 'use strict';

var cov_qyqm9cd68 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateMaximumColumnWidthIndex.js',
hash = '879c5b124d777a0bf46104f942ca9def05c6c3af',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateMaximumColumnWidthIndex.js',
statementMap: {
'0': {
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 3
}
},
'1': {
start: {
line: 12,
column: 4
},
end: {
line: 12,
column: 59
}
},
'2': {
start: {
line: 15,
column: 18
},
end: {
line: 15,
column: 50
}
},
'3': {
start: {
line: 17,
column: 2
},
end: {
line: 25,
column: 5
}
},
'4': {
start: {
line: 18,
column: 29
},
end: {
line: 18,
column: 57
}
},
'5': {
start: {
line: 20,
column: 4
},
end: {
line: 24,
column: 7
}
},
'6': {
start: {
line: 21,
column: 6
},
end: {
line: 23,
column: 7
}
},
'7': {
start: {
line: 22,
column: 8
},
end: {
line: 22,
column: 37
}
},
'8': {
start: {
line: 27,
column: 2
},
end: {
line: 27,
column: 17
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 16
}
},
loc: {
start: {
line: 10,
column: 25
},
end: {
line: 28,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 17,
column: 18
},
end: {
line: 17,
column: 19
}
},
loc: {
start: {
line: 17,
column: 27
},
end: {
line: 25,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 20,
column: 32
},
end: {
line: 20,
column: 33
}
},
loc: {
start: {
line: 20,
column: 56
},
end: {
line: 24,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 3
}
}, {
start: {
line: 11,
column: 2
},
end: {
line: 13,
column: 3
}
}]
},
'1': {
loc: {
start: {
line: 21,
column: 6
},
end: {
line: 23,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 21,
column: 6
},
end: {
line: 23,
column: 7
}
}, {
start: {
line: 21,
column: 6
},
end: {
line: 23,
column: 7
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {
'0': [0, 0],
'1': [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');

@@ -292,34 +25,14 @@

exports.default = rows => {
++cov_qyqm9cd68.f[0];
++cov_qyqm9cd68.s[0];
if (!rows[0]) {
++cov_qyqm9cd68.b[0][0];
++cov_qyqm9cd68.s[1];
throw new Error('Dataset must have at least one row.');
} else {
++cov_qyqm9cd68.b[0][1];
}
const columns = (++cov_qyqm9cd68.s[2], _lodash2.default.fill(Array(rows[0].length), 0));
const columns = _lodash2.default.fill(Array(rows[0].length), 0);
++cov_qyqm9cd68.s[3];
_lodash2.default.forEach(rows, row => {
++cov_qyqm9cd68.f[1];
const columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row);
const columnWidthIndex = (++cov_qyqm9cd68.s[4], (0, _calculateCellWidthIndex2.default)(row));
++cov_qyqm9cd68.s[5];
_lodash2.default.forEach(columnWidthIndex, (valueWidth, index0) => {
++cov_qyqm9cd68.f[2];
++cov_qyqm9cd68.s[6];
if (columns[index0] < valueWidth) {
++cov_qyqm9cd68.b[1][0];
++cov_qyqm9cd68.s[7];
columns[index0] = valueWidth;
} else {
++cov_qyqm9cd68.b[1][1];
}

@@ -329,3 +42,2 @@ });

++cov_qyqm9cd68.s[8];
return columns;

@@ -332,0 +44,0 @@ };

@@ -7,302 +7,2 @@ 'use strict';

var cov_161lflitbr = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateRowHeightIndex.js',
hash = '3ea7effa044c58c1829012ae1f0f20e85671abbe',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/calculateRowHeightIndex.js',
statementMap: {
'0': {
start: {
line: 12,
column: 21
},
end: {
line: 12,
column: 35
}
},
'1': {
start: {
line: 14,
column: 23
},
end: {
line: 14,
column: 25
}
},
'2': {
start: {
line: 16,
column: 2
},
end: {
line: 32,
column: 5
}
},
'3': {
start: {
line: 17,
column: 28
},
end: {
line: 17,
column: 56
}
},
'4': {
start: {
line: 19,
column: 4
},
end: {
line: 29,
column: 7
}
},
'5': {
start: {
line: 20,
column: 6
},
end: {
line: 22,
column: 7
}
},
'6': {
start: {
line: 21,
column: 8
},
end: {
line: 21,
column: 65
}
},
'7': {
start: {
line: 24,
column: 6
},
end: {
line: 26,
column: 7
}
},
'8': {
start: {
line: 25,
column: 8
},
end: {
line: 25,
column: 69
}
},
'9': {
start: {
line: 28,
column: 6
},
end: {
line: 28,
column: 122
}
},
'10': {
start: {
line: 31,
column: 4
},
end: {
line: 31,
column: 46
}
},
'11': {
start: {
line: 34,
column: 2
},
end: {
line: 34,
column: 22
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 11,
column: 15
},
end: {
line: 11,
column: 16
}
},
loc: {
start: {
line: 11,
column: 33
},
end: {
line: 35,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 16,
column: 18
},
end: {
line: 16,
column: 19
}
},
loc: {
start: {
line: 16,
column: 29
},
end: {
line: 32,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 19,
column: 21
},
end: {
line: 19,
column: 22
}
},
loc: {
start: {
line: 19,
column: 40
},
end: {
line: 29,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 20,
column: 6
},
end: {
line: 22,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 20,
column: 6
},
end: {
line: 22,
column: 7
}
}, {
start: {
line: 20,
column: 6
},
end: {
line: 22,
column: 7
}
}]
},
'1': {
loc: {
start: {
line: 24,
column: 6
},
end: {
line: 26,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 24,
column: 6
},
end: {
line: 26,
column: 7
}
}, {
start: {
line: 24,
column: 6
},
end: {
line: 26,
column: 7
}
}]
}
},
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
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {
'0': [0, 0],
'1': [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');

@@ -326,47 +26,24 @@

exports.default = (rows, config) => {
++cov_161lflitbr.f[0];
const tableWidth = rows[0].length;
const tableWidth = (++cov_161lflitbr.s[0], rows[0].length);
const rowSpanIndex = [];
const rowSpanIndex = (++cov_161lflitbr.s[1], []);
++cov_161lflitbr.s[2];
_lodash2.default.forEach(rows, cells => {
++cov_161lflitbr.f[1];
const cellHeightIndex = _lodash2.default.fill(Array(tableWidth), 1);
const cellHeightIndex = (++cov_161lflitbr.s[3], _lodash2.default.fill(Array(tableWidth), 1));
++cov_161lflitbr.s[4];
_lodash2.default.forEach(cells, (value, index1) => {
++cov_161lflitbr.f[2];
++cov_161lflitbr.s[5];
if (!_lodash2.default.isNumber(config.columns[index1].width)) {
++cov_161lflitbr.b[0][0];
++cov_161lflitbr.s[6];
throw new Error('column[index].width must be a number.');
} else {
++cov_161lflitbr.b[0][1];
}
++cov_161lflitbr.s[7];
if (!_lodash2.default.isBoolean(config.columns[index1].wrapWord)) {
++cov_161lflitbr.b[1][0];
++cov_161lflitbr.s[8];
throw new Error('column[index].wrapWord must be a boolean.');
} else {
++cov_161lflitbr.b[1][1];
}
++cov_161lflitbr.s[9];
cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord);
});
++cov_161lflitbr.s[10];
rowSpanIndex.push(_lodash2.default.max(cellHeightIndex));
});
++cov_161lflitbr.s[11];
return rowSpanIndex;

@@ -373,0 +50,0 @@ };

@@ -7,743 +7,2 @@ 'use strict';

var cov_129yad3bqp = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/createStream.js',
hash = '010614a23f3df4b4d26327499bc89f0103d53217',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/createStream.js',
statementMap: {
'0': {
start: {
line: 21,
column: 20
},
end: {
line: 35,
column: 1
}
},
'1': {
start: {
line: 24,
column: 2
},
end: {
line: 24,
column: 34
}
},
'2': {
start: {
line: 26,
column: 2
},
end: {
line: 26,
column: 41
}
},
'3': {
start: {
line: 28,
column: 25
},
end: {
line: 28,
column: 62
}
},
'4': {
start: {
line: 30,
column: 2
},
end: {
line: 30,
column: 66
}
},
'5': {
start: {
line: 31,
column: 2
},
end: {
line: 31,
column: 38
}
},
'6': {
start: {
line: 32,
column: 2
},
end: {
line: 32,
column: 36
}
},
'7': {
start: {
line: 34,
column: 2
},
end: {
line: 34,
column: 14
}
},
'8': {
start: {
line: 43,
column: 15
},
end: {
line: 61,
column: 1
}
},
'9': {
start: {
line: 44,
column: 15
},
end: {
line: 44,
column: 41
}
},
'10': {
start: {
line: 46,
column: 15
},
end: {
line: 48,
column: 13
}
},
'11': {
start: {
line: 47,
column: 4
},
end: {
line: 47,
column: 46
}
},
'12': {
start: {
line: 52,
column: 2
},
end: {
line: 52,
column: 14
}
},
'13': {
start: {
line: 54,
column: 2
},
end: {
line: 54,
column: 59
}
},
'14': {
start: {
line: 55,
column: 2
},
end: {
line: 55,
column: 17
}
},
'15': {
start: {
line: 56,
column: 2
},
end: {
line: 56,
column: 62
}
},
'16': {
start: {
line: 58,
column: 2
},
end: {
line: 58,
column: 29
}
},
'17': {
start: {
line: 60,
column: 2
},
end: {
line: 60,
column: 31
}
},
'18': {
start: {
line: 69,
column: 15
},
end: {
line: 87,
column: 1
}
},
'19': {
start: {
line: 70,
column: 15
},
end: {
line: 70,
column: 41
}
},
'20': {
start: {
line: 72,
column: 15
},
end: {
line: 74,
column: 13
}
},
'21': {
start: {
line: 73,
column: 4
},
end: {
line: 73,
column: 46
}
},
'22': {
start: {
line: 78,
column: 2
},
end: {
line: 78,
column: 22
}
},
'23': {
start: {
line: 80,
column: 2
},
end: {
line: 80,
column: 60
}
},
'24': {
start: {
line: 81,
column: 2
},
end: {
line: 81,
column: 17
}
},
'25': {
start: {
line: 82,
column: 2
},
end: {
line: 82,
column: 62
}
},
'26': {
start: {
line: 84,
column: 2
},
end: {
line: 84,
column: 29
}
},
'27': {
start: {
line: 86,
column: 2
},
end: {
line: 86,
column: 31
}
},
'28': {
start: {
line: 94,
column: 17
},
end: {
line: 94,
column: 45
}
},
'29': {
start: {
line: 96,
column: 27
},
end: {
line: 98,
column: 4
}
},
'30': {
start: {
line: 97,
column: 4
},
end: {
line: 97,
column: 67
}
},
'31': {
start: {
line: 102,
column: 2
},
end: {
line: 102,
column: 15
}
},
'32': {
start: {
line: 104,
column: 2
},
end: {
line: 122,
column: 4
}
},
'33': {
start: {
line: 110,
column: 6
},
end: {
line: 112,
column: 7
}
},
'34': {
start: {
line: 111,
column: 8
},
end: {
line: 111,
column: 81
}
},
'35': {
start: {
line: 114,
column: 6
},
end: {
line: 120,
column: 7
}
},
'36': {
start: {
line: 115,
column: 8
},
end: {
line: 115,
column: 22
}
},
'37': {
start: {
line: 117,
column: 8
},
end: {
line: 117,
column: 53
}
},
'38': {
start: {
line: 119,
column: 8
},
end: {
line: 119,
column: 53
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 21,
column: 20
},
end: {
line: 21,
column: 21
}
},
loc: {
start: {
line: 21,
column: 38
},
end: {
line: 35,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 43,
column: 15
},
end: {
line: 43,
column: 16
}
},
loc: {
start: {
line: 43,
column: 50
},
end: {
line: 61,
column: 1
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 46,
column: 27
},
end: {
line: 46,
column: 28
}
},
loc: {
start: {
line: 46,
column: 43
},
end: {
line: 48,
column: 3
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 69,
column: 15
},
end: {
line: 69,
column: 16
}
},
loc: {
start: {
line: 69,
column: 50
},
end: {
line: 87,
column: 1
}
}
},
'4': {
name: '(anonymous_4)',
decl: {
start: {
line: 72,
column: 27
},
end: {
line: 72,
column: 28
}
},
loc: {
start: {
line: 72,
column: 43
},
end: {
line: 74,
column: 3
}
}
},
'5': {
name: '(anonymous_5)',
decl: {
start: {
line: 93,
column: 15
},
end: {
line: 93,
column: 16
}
},
loc: {
start: {
line: 93,
column: 36
},
end: {
line: 123,
column: 1
}
}
},
'6': {
name: '(anonymous_6)',
decl: {
start: {
line: 96,
column: 55
},
end: {
line: 96,
column: 56
}
},
loc: {
start: {
line: 96,
column: 67
},
end: {
line: 98,
column: 3
}
}
},
'7': {
name: '(anonymous_7)',
decl: {
start: {
line: 109,
column: 11
},
end: {
line: 109,
column: 12
}
},
loc: {
start: {
line: 109,
column: 20
},
end: {
line: 121,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 93,
column: 16
},
end: {
line: 93,
column: 31
}
},
type: 'default-arg',
locations: [{
start: {
line: 93,
column: 29
},
end: {
line: 93,
column: 31
}
}]
},
'1': {
loc: {
start: {
line: 110,
column: 6
},
end: {
line: 112,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 110,
column: 6
},
end: {
line: 112,
column: 7
}
}, {
start: {
line: 110,
column: 6
},
end: {
line: 112,
column: 7
}
}]
},
'2': {
loc: {
start: {
line: 114,
column: 6
},
end: {
line: 120,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 114,
column: 6
},
end: {
line: 120,
column: 7
}
}, {
start: {
line: 114,
column: 6
},
end: {
line: 120,
column: 7
}
}]
}
},
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,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0
},
b: {
'0': [0],
'1': [0, 0],
'2': [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');

@@ -794,25 +53,17 @@

*/
const prepareData = (++cov_129yad3bqp.s[0], (data, config) => {
++cov_129yad3bqp.f[0];
const prepareData = (data, config) => {
let rows;
++cov_129yad3bqp.s[1];
rows = (0, _stringifyTableData2.default)(data);
++cov_129yad3bqp.s[2];
rows = (0, _truncateTableData2.default)(data, config);
const rowHeightIndex = (++cov_129yad3bqp.s[3], (0, _calculateRowHeightIndex2.default)(rows, config));
const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
++cov_129yad3bqp.s[4];
rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
++cov_129yad3bqp.s[5];
rows = (0, _alignTableData2.default)(rows, config);
++cov_129yad3bqp.s[6];
rows = (0, _padTableData2.default)(rows, config);
++cov_129yad3bqp.s[7];
return rows;
});
};

@@ -825,32 +76,21 @@ /**

*/
const create = (++cov_129yad3bqp.s[8], (row, columnWidthIndex, config) => {
++cov_129yad3bqp.f[1];
const create = (row, columnWidthIndex, config) => {
const rows = prepareData([row], config);
const rows = (++cov_129yad3bqp.s[9], prepareData([row], config));
const body = (++cov_129yad3bqp.s[10], _lodash2.default.map(rows, literalRow => {
++cov_129yad3bqp.f[2];
++cov_129yad3bqp.s[11];
const body = _lodash2.default.map(rows, literalRow => {
return (0, _drawRow2.default)(literalRow, config.border);
}).join(''));
}).join('');
let output;
++cov_129yad3bqp.s[12];
output = '';
++cov_129yad3bqp.s[13];
output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border);
++cov_129yad3bqp.s[14];
output += body;
++cov_129yad3bqp.s[15];
output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
++cov_129yad3bqp.s[16];
output = _lodash2.default.trimEnd(output);
++cov_129yad3bqp.s[17];
process.stdout.write(output);
});
};

@@ -863,32 +103,21 @@ /**

*/
const append = (++cov_129yad3bqp.s[18], (row, columnWidthIndex, config) => {
++cov_129yad3bqp.f[3];
const append = (row, columnWidthIndex, config) => {
const rows = prepareData([row], config);
const rows = (++cov_129yad3bqp.s[19], prepareData([row], config));
const body = (++cov_129yad3bqp.s[20], _lodash2.default.map(rows, literalRow => {
++cov_129yad3bqp.f[4];
++cov_129yad3bqp.s[21];
const body = _lodash2.default.map(rows, literalRow => {
return (0, _drawRow2.default)(literalRow, config.border);
}).join(''));
}).join('');
let output;
++cov_129yad3bqp.s[22];
output = '\r\x1b[K';
++cov_129yad3bqp.s[23];
output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border);
++cov_129yad3bqp.s[24];
output += body;
++cov_129yad3bqp.s[25];
output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border);
++cov_129yad3bqp.s[26];
output = _lodash2.default.trimEnd(output);
++cov_129yad3bqp.s[27];
process.stdout.write(output);
});
};

@@ -901,20 +130,14 @@ /**

exports.default = function () {
let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (++cov_129yad3bqp.b[0][0], {});
++cov_129yad3bqp.f[5];
let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
const config = (++cov_129yad3bqp.s[28], (0, _makeStreamConfig2.default)(userConfig));
const config = (0, _makeStreamConfig2.default)(userConfig);
const columnWidthIndex = (++cov_129yad3bqp.s[29], _lodash2.default.mapValues(config.columns, column => {
++cov_129yad3bqp.f[6];
++cov_129yad3bqp.s[30];
const columnWidthIndex = _lodash2.default.mapValues(config.columns, column => {
return column.width + column.paddingLeft + column.paddingRight;
}));
});
let empty;
++cov_129yad3bqp.s[31];
empty = true;
++cov_129yad3bqp.s[32];
return {

@@ -926,27 +149,11 @@ /**

write: row => {
++cov_129yad3bqp.f[7];
++cov_129yad3bqp.s[33];
if (row.length !== config.columnCount) {
++cov_129yad3bqp.b[1][0];
++cov_129yad3bqp.s[34];
throw new Error('Row cell count does not match the config.columnCount.');
} else {
++cov_129yad3bqp.b[1][1];
}
++cov_129yad3bqp.s[35];
if (empty) {
++cov_129yad3bqp.b[2][0];
++cov_129yad3bqp.s[36];
empty = false;
++cov_129yad3bqp.s[37];
return create(row, columnWidthIndex, config);
} else {
++cov_129yad3bqp.b[2][1];
++cov_129yad3bqp.s[38];
return append(row, columnWidthIndex, config);

@@ -953,0 +160,0 @@ }

@@ -8,260 +8,2 @@ 'use strict';

var cov_a6zw0ub9o = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawBorder.js',
hash = '4e518697633f89fcc2ec65c54c9d288ff127a8f1',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawBorder.js',
statementMap: {
'0': {
start: {
line: 16,
column: 19
},
end: {
line: 24,
column: 1
}
},
'1': {
start: {
line: 17,
column: 18
},
end: {
line: 21,
column: 21
}
},
'2': {
start: {
line: 19,
column: 6
},
end: {
line: 19,
column: 40
}
},
'3': {
start: {
line: 23,
column: 2
},
end: {
line: 23,
column: 51
}
},
'4': {
start: {
line: 39,
column: 22
},
end: {
line: 46,
column: 1
}
},
'5': {
start: {
line: 40,
column: 2
},
end: {
line: 45,
column: 5
}
},
'6': {
start: {
line: 61,
column: 23
},
end: {
line: 68,
column: 1
}
},
'7': {
start: {
line: 62,
column: 2
},
end: {
line: 67,
column: 5
}
},
'8': {
start: {
line: 83,
column: 25
},
end: {
line: 90,
column: 1
}
},
'9': {
start: {
line: 84,
column: 2
},
end: {
line: 89,
column: 5
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 16,
column: 19
},
end: {
line: 16,
column: 20
}
},
loc: {
start: {
line: 16,
column: 47
},
end: {
line: 24,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 18,
column: 26
},
end: {
line: 18,
column: 27
}
},
loc: {
start: {
line: 18,
column: 36
},
end: {
line: 20,
column: 5
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 39,
column: 22
},
end: {
line: 39,
column: 23
}
},
loc: {
start: {
line: 39,
column: 50
},
end: {
line: 46,
column: 1
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 61,
column: 23
},
end: {
line: 61,
column: 24
}
},
loc: {
start: {
line: 61,
column: 51
},
end: {
line: 68,
column: 1
}
}
},
'4': {
name: '(anonymous_4)',
decl: {
start: {
line: 83,
column: 25
},
end: {
line: 83,
column: 26
}
},
loc: {
start: {
line: 83,
column: 53
},
end: {
line: 90,
column: 1
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0
},
b: {}
},
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');

@@ -286,15 +28,9 @@

*/
const drawBorder = (++cov_a6zw0ub9o.s[0], (columnSizeIndex, parts) => {
++cov_a6zw0ub9o.f[0];
const columns = (++cov_a6zw0ub9o.s[1], _lodash2.default.map(columnSizeIndex, size => {
++cov_a6zw0ub9o.f[1];
++cov_a6zw0ub9o.s[2];
const drawBorder = (columnSizeIndex, parts) => {
const columns = _lodash2.default.map(columnSizeIndex, size => {
return _lodash2.default.repeat(parts.body, size);
}).join(parts.join));
}).join(parts.join);
++cov_a6zw0ub9o.s[3];
return parts.left + columns + parts.right + '\n';
});
};

@@ -314,6 +50,3 @@ /**

*/
const drawBorderTop = (++cov_a6zw0ub9o.s[4], (columnSizeIndex, parts) => {
++cov_a6zw0ub9o.f[2];
++cov_a6zw0ub9o.s[5];
const drawBorderTop = (columnSizeIndex, parts) => {
return drawBorder(columnSizeIndex, {

@@ -325,3 +58,3 @@ body: parts.topBody,

});
});
};

@@ -341,6 +74,3 @@ /**

*/
const drawBorderJoin = (++cov_a6zw0ub9o.s[6], (columnSizeIndex, parts) => {
++cov_a6zw0ub9o.f[3];
++cov_a6zw0ub9o.s[7];
const drawBorderJoin = (columnSizeIndex, parts) => {
return drawBorder(columnSizeIndex, {

@@ -352,3 +82,3 @@ body: parts.joinBody,

});
});
};

@@ -368,6 +98,3 @@ /**

*/
const drawBorderBottom = (++cov_a6zw0ub9o.s[8], (columnSizeIndex, parts) => {
++cov_a6zw0ub9o.f[4];
++cov_a6zw0ub9o.s[9];
const drawBorderBottom = (columnSizeIndex, parts) => {
return drawBorder(columnSizeIndex, {

@@ -379,3 +106,3 @@ body: parts.bottomBody,

});
});
};

@@ -382,0 +109,0 @@ exports.drawBorder = drawBorder;

@@ -7,65 +7,2 @@ 'use strict';

var cov_htwvnqv09 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawRow.js',
hash = '0dd31170d58b254867e7d0076541ce12f723bd20',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawRow.js',
statementMap: {
'0': {
start: {
line: 14,
column: 2
},
end: {
line: 14,
column: 83
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 13,
column: 15
},
end: {
line: 13,
column: 16
}
},
loc: {
start: {
line: 13,
column: 36
},
end: {
line: 15,
column: 1
}
}
}
},
branchMap: {},
s: {
'0': 0
},
f: {
'0': 0
},
b: {}
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
/**

@@ -84,5 +21,2 @@ * @typedef {Object} drawRow~border

exports.default = (columns, border) => {
++cov_htwvnqv09.f[0];
++cov_htwvnqv09.s[0];
return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n';

@@ -89,0 +23,0 @@ };

@@ -7,430 +7,2 @@ 'use strict';

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');

@@ -457,69 +29,34 @@

exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
++cov_ju3qj393e.f[0];
let output, realRowIndex, rowHeight;
const rowCount = (++cov_ju3qj393e.s[0], rows.length);
const rowCount = 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];
if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
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;

@@ -526,0 +63,0 @@ };

@@ -7,287 +7,2 @@ 'use strict';

var cov_kv3pae3nh = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/getBorderCharacters.js',
hash = '27cb59a70836f8e003ebb1cb52aadbf09dab946f',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/getBorderCharacters.js',
statementMap: {
'0': {
start: {
line: 27,
column: 2
},
end: {
line: 48,
column: 3
}
},
'1': {
start: {
line: 28,
column: 4
},
end: {
line: 47,
column: 6
}
},
'2': {
start: {
line: 50,
column: 2
},
end: {
line: 71,
column: 3
}
},
'3': {
start: {
line: 51,
column: 4
},
end: {
line: 70,
column: 6
}
},
'4': {
start: {
line: 73,
column: 2
},
end: {
line: 94,
column: 3
}
},
'5': {
start: {
line: 74,
column: 4
},
end: {
line: 93,
column: 6
}
},
'6': {
start: {
line: 96,
column: 2
},
end: {
line: 117,
column: 3
}
},
'7': {
start: {
line: 97,
column: 4
},
end: {
line: 116,
column: 6
}
},
'8': {
start: {
line: 119,
column: 2
},
end: {
line: 119,
column: 61
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 26,
column: 15
},
end: {
line: 26,
column: 16
}
},
loc: {
start: {
line: 26,
column: 25
},
end: {
line: 120,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 27,
column: 2
},
end: {
line: 48,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 27,
column: 2
},
end: {
line: 48,
column: 3
}
}, {
start: {
line: 27,
column: 2
},
end: {
line: 48,
column: 3
}
}]
},
'1': {
loc: {
start: {
line: 50,
column: 2
},
end: {
line: 71,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 50,
column: 2
},
end: {
line: 71,
column: 3
}
}, {
start: {
line: 50,
column: 2
},
end: {
line: 71,
column: 3
}
}]
},
'2': {
loc: {
start: {
line: 73,
column: 2
},
end: {
line: 94,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 73,
column: 2
},
end: {
line: 94,
column: 3
}
}, {
start: {
line: 73,
column: 2
},
end: {
line: 94,
column: 3
}
}]
},
'3': {
loc: {
start: {
line: 96,
column: 2
},
end: {
line: 117,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 96,
column: 2
},
end: {
line: 117,
column: 3
}
}, {
start: {
line: 96,
column: 2
},
end: {
line: 117,
column: 3
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0
},
f: {
'0': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0]
}
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
/* eslint-disable sort-keys */

@@ -319,9 +34,3 @@

exports.default = name => {
++cov_kv3pae3nh.f[0];
++cov_kv3pae3nh.s[0];
if (name === 'honeywell') {
++cov_kv3pae3nh.b[0][0];
++cov_kv3pae3nh.s[1];
return {

@@ -347,11 +56,5 @@ topBody: '═',

};
} else {
++cov_kv3pae3nh.b[0][1];
}
++cov_kv3pae3nh.s[2];
if (name === 'norc') {
++cov_kv3pae3nh.b[1][0];
++cov_kv3pae3nh.s[3];
return {

@@ -377,11 +80,5 @@ topBody: '─',

};
} else {
++cov_kv3pae3nh.b[1][1];
}
++cov_kv3pae3nh.s[4];
if (name === 'ramac') {
++cov_kv3pae3nh.b[2][0];
++cov_kv3pae3nh.s[5];
return {

@@ -407,11 +104,5 @@ topBody: '-',

};
} else {
++cov_kv3pae3nh.b[2][1];
}
++cov_kv3pae3nh.s[6];
if (name === 'void') {
++cov_kv3pae3nh.b[3][0];
++cov_kv3pae3nh.s[7];
return {

@@ -437,7 +128,4 @@ topBody: '',

};
} else {
++cov_kv3pae3nh.b[3][1];
}
++cov_kv3pae3nh.s[8];
throw new Error('Unknown border template "' + name + '".');

@@ -444,0 +132,0 @@ };

@@ -8,26 +8,2 @@ 'use strict';

var cov_digs50sd4 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/index.js',
hash = '7f2fa90ba21b2cc6c46378895b50888aefc46840',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/index.js',
statementMap: {},
fnMap: {},
branchMap: {},
s: {},
f: {},
b: {}
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var _table = require('./table');

@@ -34,0 +10,0 @@

@@ -7,501 +7,2 @@ 'use strict';

var cov_6np2uykqo = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/makeConfig.js',
hash = '737b4d2d082188ccc29e35a8836e0d096382661a',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/makeConfig.js',
statementMap: {
'0': {
start: {
line: 12,
column: 19
},
end: {
line: 14,
column: 1
}
},
'1': {
start: {
line: 13,
column: 2
},
end: {
line: 13,
column: 64
}
},
'2': {
start: {
line: 25,
column: 20
},
end: {
line: 44,
column: 1
}
},
'3': {
start: {
line: 26,
column: 34
},
end: {
line: 26,
column: 72
}
},
'4': {
start: {
line: 28,
column: 2
},
end: {
line: 41,
column: 5
}
},
'5': {
start: {
line: 29,
column: 4
},
end: {
line: 31,
column: 5
}
},
'6': {
start: {
line: 30,
column: 6
},
end: {
line: 30,
column: 26
}
},
'7': {
start: {
line: 33,
column: 4
},
end: {
line: 40,
column: 38
}
},
'8': {
start: {
line: 43,
column: 2
},
end: {
line: 43,
column: 17
}
},
'9': {
start: {
line: 55,
column: 2
},
end: {
line: 55,
column: 44
}
},
'10': {
start: {
line: 57,
column: 17
},
end: {
line: 57,
column: 40
}
},
'11': {
start: {
line: 59,
column: 2
},
end: {
line: 59,
column: 44
}
},
'12': {
start: {
line: 60,
column: 2
},
end: {
line: 60,
column: 75
}
},
'13': {
start: {
line: 62,
column: 2
},
end: {
line: 69,
column: 3
}
},
'14': {
start: {
line: 66,
column: 4
},
end: {
line: 68,
column: 6
}
},
'15': {
start: {
line: 67,
column: 6
},
end: {
line: 67,
column: 18
}
},
'16': {
start: {
line: 71,
column: 2
},
end: {
line: 71,
column: 16
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 12,
column: 19
},
end: {
line: 12,
column: 20
}
},
loc: {
start: {
line: 12,
column: 36
},
end: {
line: 14,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 25,
column: 20
},
end: {
line: 25,
column: 21
}
},
loc: {
start: {
line: 25,
column: 64
},
end: {
line: 44,
column: 1
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 28,
column: 26
},
end: {
line: 28,
column: 27
}
},
loc: {
start: {
line: 28,
column: 37
},
end: {
line: 41,
column: 3
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 54,
column: 15
},
end: {
line: 54,
column: 16
}
},
loc: {
start: {
line: 54,
column: 42
},
end: {
line: 72,
column: 1
}
}
},
'4': {
name: '(anonymous_4)',
decl: {
start: {
line: 66,
column: 32
},
end: {
line: 66,
column: 33
}
},
loc: {
start: {
line: 66,
column: 38
},
end: {
line: 68,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 12,
column: 20
},
end: {
line: 12,
column: 31
}
},
type: 'default-arg',
locations: [{
start: {
line: 12,
column: 29
},
end: {
line: 12,
column: 31
}
}]
},
'1': {
loc: {
start: {
line: 25,
column: 27
},
end: {
line: 25,
column: 39
}
},
type: 'default-arg',
locations: [{
start: {
line: 25,
column: 37
},
end: {
line: 25,
column: 39
}
}]
},
'2': {
loc: {
start: {
line: 25,
column: 41
},
end: {
line: 25,
column: 59
}
},
type: 'default-arg',
locations: [{
start: {
line: 25,
column: 57
},
end: {
line: 25,
column: 59
}
}]
},
'3': {
loc: {
start: {
line: 29,
column: 4
},
end: {
line: 31,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 29,
column: 4
},
end: {
line: 31,
column: 5
}
}, {
start: {
line: 29,
column: 4
},
end: {
line: 31,
column: 5
}
}]
},
'4': {
loc: {
start: {
line: 54,
column: 22
},
end: {
line: 54,
column: 37
}
},
type: 'default-arg',
locations: [{
start: {
line: 54,
column: 35
},
end: {
line: 54,
column: 37
}
}]
},
'5': {
loc: {
start: {
line: 62,
column: 2
},
end: {
line: 69,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 62,
column: 2
},
end: {
line: 69,
column: 3
}
}, {
start: {
line: 62,
column: 2
},
end: {
line: 69,
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,
'16': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0
},
b: {
'0': [0],
'1': [0],
'2': [0],
'3': [0, 0],
'4': [0],
'5': [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');

@@ -531,9 +32,7 @@

*/
const makeBorder = (++cov_6np2uykqo.s[0], function () {
let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (++cov_6np2uykqo.b[0][0], {});
++cov_6np2uykqo.f[0];
++cov_6np2uykqo.s[1];
const makeBorder = function makeBorder() {
let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
});
};

@@ -549,24 +48,13 @@ /**

*/
const makeColumns = (++cov_6np2uykqo.s[2], function (rows) {
let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (++cov_6np2uykqo.b[1][0], {});
let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (++cov_6np2uykqo.b[2][0], {});
++cov_6np2uykqo.f[1];
const makeColumns = function makeColumns(rows) {
let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
const maximumColumnWidthIndex = (++cov_6np2uykqo.s[3], (0, _calculateMaximumColumnWidthIndex2.default)(rows));
const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows);
++cov_6np2uykqo.s[4];
_lodash2.default.times(rows[0].length, index => {
++cov_6np2uykqo.f[2];
++cov_6np2uykqo.s[5];
if (_lodash2.default.isUndefined(columns[index])) {
++cov_6np2uykqo.b[3][0];
++cov_6np2uykqo.s[6];
columns[index] = {};
} else {
++cov_6np2uykqo.b[3][1];
}
++cov_6np2uykqo.s[7];
columns[index] = _lodash2.default.assign({

@@ -582,5 +70,4 @@ alignment: 'left',

++cov_6np2uykqo.s[8];
return columns;
});
};

@@ -597,20 +84,12 @@ /**

exports.default = function (rows) {
let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (++cov_6np2uykqo.b[4][0], {});
++cov_6np2uykqo.f[3];
++cov_6np2uykqo.s[9];
let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
(0, _validateConfig2.default)('config.json', userConfig);
const config = (++cov_6np2uykqo.s[10], _lodash2.default.cloneDeep(userConfig));
const config = _lodash2.default.cloneDeep(userConfig);
++cov_6np2uykqo.s[11];
config.border = makeBorder(config.border);
++cov_6np2uykqo.s[12];
config.columns = makeColumns(rows, config.columns, config.columnDefault);
++cov_6np2uykqo.s[13];
if (!config.drawHorizontalLine) {
++cov_6np2uykqo.b[5][0];
++cov_6np2uykqo.s[14];
/**

@@ -620,12 +99,6 @@ * @returns {boolean}

config.drawHorizontalLine = () => {
++cov_6np2uykqo.f[4];
++cov_6np2uykqo.s[15];
return true;
};
} else {
++cov_6np2uykqo.b[5][1];
}
++cov_6np2uykqo.s[16];
return config;

@@ -632,0 +105,0 @@ };

@@ -7,543 +7,2 @@ 'use strict';

var cov_3c92k3xh1 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/makeStreamConfig.js',
hash = 'a51cd8d347bf6e0ccdfb4ff4cb6c763d2f8b1f98',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/makeStreamConfig.js',
statementMap: {
'0': {
start: {
line: 11,
column: 19
},
end: {
line: 13,
column: 1
}
},
'1': {
start: {
line: 12,
column: 2
},
end: {
line: 12,
column: 64
}
},
'2': {
start: {
line: 24,
column: 20
},
end: {
line: 40,
column: 1
}
},
'3': {
start: {
line: 25,
column: 2
},
end: {
line: 37,
column: 5
}
},
'4': {
start: {
line: 26,
column: 4
},
end: {
line: 28,
column: 5
}
},
'5': {
start: {
line: 27,
column: 6
},
end: {
line: 27,
column: 26
}
},
'6': {
start: {
line: 30,
column: 4
},
end: {
line: 36,
column: 38
}
},
'7': {
start: {
line: 39,
column: 2
},
end: {
line: 39,
column: 17
}
},
'8': {
start: {
line: 67,
column: 2
},
end: {
line: 67,
column: 50
}
},
'9': {
start: {
line: 69,
column: 17
},
end: {
line: 69,
column: 40
}
},
'10': {
start: {
line: 71,
column: 2
},
end: {
line: 73,
column: 3
}
},
'11': {
start: {
line: 72,
column: 4
},
end: {
line: 72,
column: 87
}
},
'12': {
start: {
line: 75,
column: 2
},
end: {
line: 77,
column: 3
}
},
'13': {
start: {
line: 76,
column: 4
},
end: {
line: 76,
column: 56
}
},
'14': {
start: {
line: 79,
column: 2
},
end: {
line: 79,
column: 44
}
},
'15': {
start: {
line: 80,
column: 2
},
end: {
line: 80,
column: 89
}
},
'16': {
start: {
line: 82,
column: 2
},
end: {
line: 82,
column: 16
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 11,
column: 19
},
end: {
line: 11,
column: 20
}
},
loc: {
start: {
line: 11,
column: 36
},
end: {
line: 13,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 24,
column: 20
},
end: {
line: 24,
column: 21
}
},
loc: {
start: {
line: 24,
column: 71
},
end: {
line: 40,
column: 1
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 25,
column: 23
},
end: {
line: 25,
column: 24
}
},
loc: {
start: {
line: 25,
column: 34
},
end: {
line: 37,
column: 3
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 66,
column: 15
},
end: {
line: 66,
column: 16
}
},
loc: {
start: {
line: 66,
column: 36
},
end: {
line: 83,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 11,
column: 20
},
end: {
line: 11,
column: 31
}
},
type: 'default-arg',
locations: [{
start: {
line: 11,
column: 29
},
end: {
line: 11,
column: 31
}
}]
},
'1': {
loc: {
start: {
line: 24,
column: 34
},
end: {
line: 24,
column: 46
}
},
type: 'default-arg',
locations: [{
start: {
line: 24,
column: 44
},
end: {
line: 24,
column: 46
}
}]
},
'2': {
loc: {
start: {
line: 24,
column: 48
},
end: {
line: 24,
column: 66
}
},
type: 'default-arg',
locations: [{
start: {
line: 24,
column: 64
},
end: {
line: 24,
column: 66
}
}]
},
'3': {
loc: {
start: {
line: 26,
column: 4
},
end: {
line: 28,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 26,
column: 4
},
end: {
line: 28,
column: 5
}
}, {
start: {
line: 26,
column: 4
},
end: {
line: 28,
column: 5
}
}]
},
'4': {
loc: {
start: {
line: 66,
column: 16
},
end: {
line: 66,
column: 31
}
},
type: 'default-arg',
locations: [{
start: {
line: 66,
column: 29
},
end: {
line: 66,
column: 31
}
}]
},
'5': {
loc: {
start: {
line: 71,
column: 2
},
end: {
line: 73,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 71,
column: 2
},
end: {
line: 73,
column: 3
}
}, {
start: {
line: 71,
column: 2
},
end: {
line: 73,
column: 3
}
}]
},
'6': {
loc: {
start: {
line: 71,
column: 6
},
end: {
line: 71,
column: 58
}
},
type: 'binary-expr',
locations: [{
start: {
line: 71,
column: 6
},
end: {
line: 71,
column: 27
}
}, {
start: {
line: 71,
column: 31
},
end: {
line: 71,
column: 58
}
}]
},
'7': {
loc: {
start: {
line: 75,
column: 2
},
end: {
line: 77,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 75,
column: 2
},
end: {
line: 77,
column: 3
}
}, {
start: {
line: 75,
column: 2
},
end: {
line: 77,
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,
'16': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0
},
b: {
'0': [0],
'1': [0],
'2': [0],
'3': [0, 0],
'4': [0],
'5': [0, 0],
'6': [0, 0],
'7': [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');

@@ -569,9 +28,7 @@

*/
const makeBorder = (++cov_3c92k3xh1.s[0], function () {
let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (++cov_3c92k3xh1.b[0][0], {});
++cov_3c92k3xh1.f[0];
++cov_3c92k3xh1.s[1];
const makeBorder = function makeBorder() {
let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return _lodash2.default.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border);
});
};

@@ -587,22 +44,11 @@ /**

*/
const makeColumns = (++cov_3c92k3xh1.s[2], function (columnCount) {
let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (++cov_3c92k3xh1.b[1][0], {});
let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (++cov_3c92k3xh1.b[2][0], {});
++cov_3c92k3xh1.f[1];
++cov_3c92k3xh1.s[3];
const makeColumns = function makeColumns(columnCount) {
let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
_lodash2.default.times(columnCount, index => {
++cov_3c92k3xh1.f[2];
++cov_3c92k3xh1.s[4];
if (_lodash2.default.isUndefined(columns[index])) {
++cov_3c92k3xh1.b[3][0];
++cov_3c92k3xh1.s[5];
columns[index] = {};
} else {
++cov_3c92k3xh1.b[3][1];
}
++cov_3c92k3xh1.s[6];
columns[index] = _lodash2.default.assign({

@@ -617,5 +63,4 @@ alignment: 'left',

++cov_3c92k3xh1.s[7];
return columns;
});
};

@@ -648,36 +93,19 @@ /**

exports.default = function () {
let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (++cov_3c92k3xh1.b[4][0], {});
++cov_3c92k3xh1.f[3];
++cov_3c92k3xh1.s[8];
let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
(0, _validateConfig2.default)('streamConfig.json', userConfig);
const config = (++cov_3c92k3xh1.s[9], _lodash2.default.cloneDeep(userConfig));
const config = _lodash2.default.cloneDeep(userConfig);
++cov_3c92k3xh1.s[10];
if ((++cov_3c92k3xh1.b[6][0], !config.columnDefault) || (++cov_3c92k3xh1.b[6][1], !config.columnDefault.width)) {
++cov_3c92k3xh1.b[5][0];
++cov_3c92k3xh1.s[11];
if (!config.columnDefault || !config.columnDefault.width) {
throw new Error('Must provide config.columnDefault.width when creating a stream.');
} else {
++cov_3c92k3xh1.b[5][1];
}
++cov_3c92k3xh1.s[12];
if (!config.columnCount) {
++cov_3c92k3xh1.b[7][0];
++cov_3c92k3xh1.s[13];
throw new Error('Must provide config.columnCount.');
} else {
++cov_3c92k3xh1.b[7][1];
}
++cov_3c92k3xh1.s[14];
config.border = makeBorder(config.border);
++cov_3c92k3xh1.s[15];
config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault);
++cov_3c92k3xh1.s[16];
return config;

@@ -684,0 +112,0 @@ };

@@ -7,317 +7,2 @@ 'use strict';

var cov_9n6q52jtc = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/mapDataUsingRowHeightIndex.js',
hash = 'ef60a93a63cc52a2b2024b7c01e8fc35b8ef865f',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/mapDataUsingRowHeightIndex.js',
statementMap: {
'0': {
start: {
line: 12,
column: 21
},
end: {
line: 12,
column: 43
}
},
'1': {
start: {
line: 14,
column: 21
},
end: {
line: 38,
column: 4
}
},
'2': {
start: {
line: 15,
column: 22
},
end: {
line: 17,
column: 6
}
},
'3': {
start: {
line: 16,
column: 6
},
end: {
line: 16,
column: 43
}
},
'4': {
start: {
line: 23,
column: 4
},
end: {
line: 35,
column: 7
}
},
'5': {
start: {
line: 26,
column: 6
},
end: {
line: 30,
column: 7
}
},
'6': {
start: {
line: 27,
column: 8
},
end: {
line: 27,
column: 69
}
},
'7': {
start: {
line: 29,
column: 8
},
end: {
line: 29,
column: 71
}
},
'8': {
start: {
line: 32,
column: 6
},
end: {
line: 34,
column: 9
}
},
'9': {
start: {
line: 33,
column: 8
},
end: {
line: 33,
column: 41
}
},
'10': {
start: {
line: 37,
column: 4
},
end: {
line: 37,
column: 21
}
},
'11': {
start: {
line: 40,
column: 2
},
end: {
line: 40,
column: 31
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 11,
column: 15
},
end: {
line: 11,
column: 16
}
},
loc: {
start: {
line: 11,
column: 57
},
end: {
line: 41,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 14,
column: 41
},
end: {
line: 14,
column: 42
}
},
loc: {
start: {
line: 14,
column: 60
},
end: {
line: 38,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 15,
column: 54
},
end: {
line: 15,
column: 55
}
},
loc: {
start: {
line: 15,
column: 60
},
end: {
line: 17,
column: 5
}
}
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 23,
column: 21
},
end: {
line: 23,
column: 22
}
},
loc: {
start: {
line: 23,
column: 40
},
end: {
line: 35,
column: 5
}
}
},
'4': {
name: '(anonymous_4)',
decl: {
start: {
line: 32,
column: 30
},
end: {
line: 32,
column: 31
}
},
loc: {
start: {
line: 32,
column: 48
},
end: {
line: 34,
column: 7
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 26,
column: 6
},
end: {
line: 30,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 26,
column: 6
},
end: {
line: 30,
column: 7
}
}, {
start: {
line: 26,
column: 6
},
end: {
line: 30,
column: 7
}
}]
}
},
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
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0
},
b: {
'0': [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');

@@ -344,15 +29,8 @@

exports.default = (unmappedRows, rowHeightIndex, config) => {
++cov_9n6q52jtc.f[0];
const tableWidth = unmappedRows[0].length;
const tableWidth = (++cov_9n6q52jtc.s[0], unmappedRows[0].length);
const mappedRows = (++cov_9n6q52jtc.s[1], _lodash2.default.map(unmappedRows, (cells, index0) => {
++cov_9n6q52jtc.f[1];
const rowHeight = (++cov_9n6q52jtc.s[2], _lodash2.default.times(rowHeightIndex[index0], () => {
++cov_9n6q52jtc.f[2];
++cov_9n6q52jtc.s[3];
const mappedRows = _lodash2.default.map(unmappedRows, (cells, index0) => {
const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => {
return _lodash2.default.fill(Array(tableWidth), '');
}));
});

@@ -363,26 +41,12 @@ // rowHeight

++cov_9n6q52jtc.s[4];
_lodash2.default.forEach(cells, (value, index1) => {
++cov_9n6q52jtc.f[3];
let chunkedValue;
++cov_9n6q52jtc.s[5];
if (config.columns[index1].wrapWord) {
++cov_9n6q52jtc.b[0][0];
++cov_9n6q52jtc.s[6];
chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width);
} else {
++cov_9n6q52jtc.b[0][1];
++cov_9n6q52jtc.s[7];
chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width);
}
++cov_9n6q52jtc.s[8];
_lodash2.default.forEach(chunkedValue, (part, index2) => {
++cov_9n6q52jtc.f[4];
++cov_9n6q52jtc.s[9];
rowHeight[index2][index1] = part;

@@ -392,7 +56,5 @@ });

++cov_9n6q52jtc.s[10];
return rowHeight;
}));
});
++cov_9n6q52jtc.s[11];
return _lodash2.default.flatten(mappedRows);

@@ -399,0 +61,0 @@ };

@@ -7,146 +7,2 @@ 'use strict';

var cov_twrxa7qlr = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/padTableData.js',
hash = '6e7c959e85570169d58cc4f337d2b17a58cea753',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/padTableData.js',
statementMap: {
'0': {
start: {
line: 9,
column: 2
},
end: {
line: 15,
column: 5
}
},
'1': {
start: {
line: 10,
column: 4
},
end: {
line: 14,
column: 7
}
},
'2': {
start: {
line: 11,
column: 21
},
end: {
line: 11,
column: 43
}
},
'3': {
start: {
line: 13,
column: 6
},
end: {
line: 13,
column: 92
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 8,
column: 15
},
end: {
line: 8,
column: 16
}
},
loc: {
start: {
line: 8,
column: 33
},
end: {
line: 16,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 9,
column: 21
},
end: {
line: 9,
column: 22
}
},
loc: {
start: {
line: 9,
column: 32
},
end: {
line: 15,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 10,
column: 24
},
end: {
line: 10,
column: 25
}
},
loc: {
start: {
line: 10,
column: 43
},
end: {
line: 14,
column: 5
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {}
},
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');

@@ -164,15 +20,6 @@

exports.default = (rows, config) => {
++cov_twrxa7qlr.f[0];
++cov_twrxa7qlr.s[0];
return _lodash2.default.map(rows, cells => {
++cov_twrxa7qlr.f[1];
++cov_twrxa7qlr.s[1];
return _lodash2.default.map(cells, (value, index1) => {
++cov_twrxa7qlr.f[2];
const column = config.columns[index1];
const column = (++cov_twrxa7qlr.s[2], config.columns[index1]);
++cov_twrxa7qlr.s[3];
return _lodash2.default.repeat(' ', column.paddingLeft) + value + _lodash2.default.repeat(' ', column.paddingRight);

@@ -179,0 +26,0 @@ });

@@ -7,100 +7,2 @@ 'use strict';

var cov_1g1o2zo2a1 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/stringifyTableData.js',
hash = '259c356ed61ccc108a62d2707db6e7eccf7f6c78',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/stringifyTableData.js',
statementMap: {
'0': {
start: {
line: 10,
column: 2
},
end: {
line: 12,
column: 5
}
},
'1': {
start: {
line: 11,
column: 4
},
end: {
line: 11,
column: 32
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 9,
column: 15
},
end: {
line: 9,
column: 16
}
},
loc: {
start: {
line: 9,
column: 25
},
end: {
line: 13,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 10,
column: 21
},
end: {
line: 10,
column: 22
}
},
loc: {
start: {
line: 10,
column: 32
},
end: {
line: 12,
column: 3
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0
},
f: {
'0': 0,
'1': 0
},
b: {}
},
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');

@@ -119,9 +21,3 @@

exports.default = rows => {
++cov_1g1o2zo2a1.f[0];
++cov_1g1o2zo2a1.s[0];
return _lodash2.default.map(rows, cells => {
++cov_1g1o2zo2a1.f[1];
++cov_1g1o2zo2a1.s[1];
return _lodash2.default.map(cells, String);

@@ -128,0 +24,0 @@ });

@@ -7,190 +7,2 @@ 'use strict';

var cov_1y0c093qbd = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/table.js',
hash = 'd4162e54a4a463a5103e2932efcc4187503c2876',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/table.js',
statementMap: {
'0': {
start: {
line: 77,
column: 2
},
end: {
line: 77,
column: 26
}
},
'1': {
start: {
line: 79,
column: 2
},
end: {
line: 79,
column: 34
}
},
'2': {
start: {
line: 81,
column: 17
},
end: {
line: 81,
column: 45
}
},
'3': {
start: {
line: 83,
column: 2
},
end: {
line: 83,
column: 41
}
},
'4': {
start: {
line: 85,
column: 25
},
end: {
line: 85,
column: 62
}
},
'5': {
start: {
line: 87,
column: 2
},
end: {
line: 87,
column: 66
}
},
'6': {
start: {
line: 88,
column: 2
},
end: {
line: 88,
column: 38
}
},
'7': {
start: {
line: 89,
column: 2
},
end: {
line: 89,
column: 36
}
},
'8': {
start: {
line: 91,
column: 25
},
end: {
line: 91,
column: 57
}
},
'9': {
start: {
line: 93,
column: 2
},
end: {
line: 93,
column: 99
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 74,
column: 15
},
end: {
line: 74,
column: 16
}
},
loc: {
start: {
line: 74,
column: 42
},
end: {
line: 94,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 74,
column: 22
},
end: {
line: 74,
column: 37
}
},
type: 'default-arg',
locations: [{
start: {
line: 74,
column: 35
},
end: {
line: 74,
column: 37
}
}]
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0
},
f: {
'0': 0
},
b: {
'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 _drawTable = require('./drawTable');

@@ -301,30 +113,22 @@

exports.default = function (data) {
let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (++cov_1y0c093qbd.b[0][0], {});
++cov_1y0c093qbd.f[0];
let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
let rows;
++cov_1y0c093qbd.s[0];
(0, _validateTableData2.default)(data);
++cov_1y0c093qbd.s[1];
rows = (0, _stringifyTableData2.default)(data);
const config = (++cov_1y0c093qbd.s[2], (0, _makeConfig2.default)(rows, userConfig));
const config = (0, _makeConfig2.default)(rows, userConfig);
++cov_1y0c093qbd.s[3];
rows = (0, _truncateTableData2.default)(data, config);
const rowHeightIndex = (++cov_1y0c093qbd.s[4], (0, _calculateRowHeightIndex2.default)(rows, config));
const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config);
++cov_1y0c093qbd.s[5];
rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config);
++cov_1y0c093qbd.s[6];
rows = (0, _alignTableData2.default)(rows, config);
++cov_1y0c093qbd.s[7];
rows = (0, _padTableData2.default)(rows, config);
const cellWidthIndex = (++cov_1y0c093qbd.s[8], (0, _calculateCellWidthIndex2.default)(rows[0]));
const cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]);
++cov_1y0c093qbd.s[9];
return (0, _drawTable2.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);

@@ -331,0 +135,0 @@ };

@@ -7,135 +7,2 @@ 'use strict';

var cov_2ah9qi3g32 = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/truncateTableData.js',
hash = '206286e5f3c48d9bf4d4c90ecb0d671778434f3b',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/truncateTableData.js',
statementMap: {
'0': {
start: {
line: 10,
column: 2
},
end: {
line: 16,
column: 5
}
},
'1': {
start: {
line: 11,
column: 4
},
end: {
line: 15,
column: 7
}
},
'2': {
start: {
line: 12,
column: 6
},
end: {
line: 14,
column: 9
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 9,
column: 15
},
end: {
line: 9,
column: 16
}
},
loc: {
start: {
line: 9,
column: 33
},
end: {
line: 17,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 10,
column: 21
},
end: {
line: 10,
column: 22
}
},
loc: {
start: {
line: 10,
column: 32
},
end: {
line: 16,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 11,
column: 24
},
end: {
line: 11,
column: 25
}
},
loc: {
start: {
line: 11,
column: 44
},
end: {
line: 15,
column: 5
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {}
},
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');

@@ -154,13 +21,4 @@

exports.default = (rows, config) => {
++cov_2ah9qi3g32.f[0];
++cov_2ah9qi3g32.s[0];
return _lodash2.default.map(rows, cells => {
++cov_2ah9qi3g32.f[1];
++cov_2ah9qi3g32.s[1];
return _lodash2.default.map(cells, (content, index) => {
++cov_2ah9qi3g32.f[2];
++cov_2ah9qi3g32.s[2];
return _lodash2.default.truncate(content, {

@@ -167,0 +25,0 @@ length: config.columns[index].truncate

@@ -7,467 +7,2 @@ 'use strict';

var cov_1t773kz97a = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/validateTableData.js',
hash = '2e262b14db7cdd95b95ae38fca6a5037d2aa3bd7',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/validateTableData.js',
statementMap: {
'0': {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
},
'1': {
start: {
line: 17,
column: 4
},
end: {
line: 17,
column: 52
}
},
'2': {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
},
'3': {
start: {
line: 21,
column: 4
},
end: {
line: 21,
column: 59
}
},
'4': {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
'5': {
start: {
line: 25,
column: 4
},
end: {
line: 25,
column: 62
}
},
'6': {
start: {
line: 28,
column: 23
},
end: {
line: 28,
column: 37
}
},
'7': {
start: {
line: 30,
column: 2
},
end: {
line: 46,
column: 5
}
},
'8': {
start: {
line: 31,
column: 4
},
end: {
line: 33,
column: 5
}
},
'9': {
start: {
line: 32,
column: 6
},
end: {
line: 32,
column: 58
}
},
'10': {
start: {
line: 35,
column: 4
},
end: {
line: 37,
column: 5
}
},
'11': {
start: {
line: 36,
column: 6
},
end: {
line: 36,
column: 71
}
},
'12': {
start: {
line: 41,
column: 4
},
end: {
line: 45,
column: 7
}
},
'13': {
start: {
line: 42,
column: 6
},
end: {
line: 44,
column: 7
}
},
'14': {
start: {
line: 43,
column: 8
},
end: {
line: 43,
column: 75
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 15,
column: 15
},
end: {
line: 15,
column: 16
}
},
loc: {
start: {
line: 15,
column: 25
},
end: {
line: 47,
column: 1
}
}
},
'1': {
name: '(anonymous_1)',
decl: {
start: {
line: 30,
column: 18
},
end: {
line: 30,
column: 19
}
},
loc: {
start: {
line: 30,
column: 29
},
end: {
line: 46,
column: 3
}
}
},
'2': {
name: '(anonymous_2)',
decl: {
start: {
line: 41,
column: 21
},
end: {
line: 41,
column: 22
}
},
loc: {
start: {
line: 41,
column: 31
},
end: {
line: 45,
column: 5
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
}, {
start: {
line: 16,
column: 2
},
end: {
line: 18,
column: 3
}
}]
},
'1': {
loc: {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
}, {
start: {
line: 20,
column: 2
},
end: {
line: 22,
column: 3
}
}]
},
'2': {
loc: {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}, {
start: {
line: 24,
column: 2
},
end: {
line: 26,
column: 3
}
}]
},
'3': {
loc: {
start: {
line: 31,
column: 4
},
end: {
line: 33,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 31,
column: 4
},
end: {
line: 33,
column: 5
}
}, {
start: {
line: 31,
column: 4
},
end: {
line: 33,
column: 5
}
}]
},
'4': {
loc: {
start: {
line: 35,
column: 4
},
end: {
line: 37,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 35,
column: 4
},
end: {
line: 37,
column: 5
}
}, {
start: {
line: 35,
column: 4
},
end: {
line: 37,
column: 5
}
}]
},
'5': {
loc: {
start: {
line: 42,
column: 6
},
end: {
line: 44,
column: 7
}
},
type: 'if',
locations: [{
start: {
line: 42,
column: 6
},
end: {
line: 44,
column: 7
}
}, {
start: {
line: 42,
column: 6
},
end: {
line: 44,
column: 7
}
}]
}
},
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
},
f: {
'0': 0,
'1': 0,
'2': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [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');

@@ -492,58 +27,23 @@

exports.default = rows => {
++cov_1t773kz97a.f[0];
++cov_1t773kz97a.s[0];
if (!_lodash2.default.isArray(rows)) {
++cov_1t773kz97a.b[0][0];
++cov_1t773kz97a.s[1];
throw new Error('Table data must be an array.');
} else {
++cov_1t773kz97a.b[0][1];
}
++cov_1t773kz97a.s[2];
if (rows.length === 0) {
++cov_1t773kz97a.b[1][0];
++cov_1t773kz97a.s[3];
throw new Error('Table must define at least one row.');
} else {
++cov_1t773kz97a.b[1][1];
}
++cov_1t773kz97a.s[4];
if (rows[0].length === 0) {
++cov_1t773kz97a.b[2][0];
++cov_1t773kz97a.s[5];
throw new Error('Table must define at least one column.');
} else {
++cov_1t773kz97a.b[2][1];
}
const columnNumber = (++cov_1t773kz97a.s[6], rows[0].length);
const columnNumber = rows[0].length;
++cov_1t773kz97a.s[7];
_lodash2.default.forEach(rows, cells => {
++cov_1t773kz97a.f[1];
++cov_1t773kz97a.s[8];
if (!_lodash2.default.isArray(cells)) {
++cov_1t773kz97a.b[3][0];
++cov_1t773kz97a.s[9];
throw new Error('Table row data must be an array.');
} else {
++cov_1t773kz97a.b[3][1];
}
++cov_1t773kz97a.s[10];
if (cells.length !== columnNumber) {
++cov_1t773kz97a.b[4][0];
++cov_1t773kz97a.s[11];
throw new Error('Table must have a consistent number of cells.');
} else {
++cov_1t773kz97a.b[4][1];
}

@@ -553,14 +53,5 @@

// @see https://github.com/gajus/table/issues/9
++cov_1t773kz97a.s[12];
_lodash2.default.forEach(cells, cell => {
++cov_1t773kz97a.f[2];
++cov_1t773kz97a.s[13];
if (/[\x01-\x1A]/.test(cell)) {
++cov_1t773kz97a.b[5][0];
++cov_1t773kz97a.s[14];
throw new Error('Table data must not contain control characters.');
} else {
++cov_1t773kz97a.b[5][1];
}

@@ -567,0 +58,0 @@ });

@@ -7,120 +7,2 @@ 'use strict';

var cov_2j1tsrxplw = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/wrapString.js',
hash = '15b178ad978dad5acb4b258f96afd96dfca6bd54',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/wrapString.js',
statementMap: {
'0': {
start: {
line: 19,
column: 2
},
end: {
line: 19,
column: 25
}
},
'1': {
start: {
line: 21,
column: 17
},
end: {
line: 21,
column: 19
}
},
'2': {
start: {
line: 23,
column: 2
},
end: {
line: 27,
column: 38
}
},
'3': {
start: {
line: 24,
column: 4
},
end: {
line: 24,
column: 46
}
},
'4': {
start: {
line: 26,
column: 4
},
end: {
line: 26,
column: 53
}
},
'5': {
start: {
line: 29,
column: 2
},
end: {
line: 29,
column: 16
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 16,
column: 15
},
end: {
line: 16,
column: 16
}
},
loc: {
start: {
line: 16,
column: 34
},
end: {
line: 30,
column: 1
}
}
}
},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0
},
f: {
'0': 0
},
b: {}
},
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');

@@ -152,22 +34,14 @@

exports.default = (subject, size) => {
++cov_2j1tsrxplw.f[0];
let subjectSlice;
++cov_2j1tsrxplw.s[0];
subjectSlice = subject;
const chunks = (++cov_2j1tsrxplw.s[1], []);
const chunks = [];
++cov_2j1tsrxplw.s[2];
do {
++cov_2j1tsrxplw.s[3];
chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size));
++cov_2j1tsrxplw.s[4];
subjectSlice = _lodash2.default.trim((0, _sliceAnsi2.default)(subjectSlice, size));
} while ((0, _stringWidth2.default)(subjectSlice));
++cov_2j1tsrxplw.s[5];
return chunks;

@@ -174,0 +48,0 @@ };

@@ -7,232 +7,2 @@ 'use strict';

var cov_2in591hdkb = function () {
var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/wrapWord.js',
hash = 'b859c23198f963a8e98116f29b9c80fef9051c0e',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/wrapWord.js',
statementMap: {
'0': {
start: {
line: 13,
column: 2
},
end: {
line: 13,
column: 18
}
},
'1': {
start: {
line: 15,
column: 17
},
end: {
line: 15,
column: 19
}
},
'2': {
start: {
line: 18,
column: 13
},
end: {
line: 18,
column: 102
}
},
'3': {
start: {
line: 20,
column: 2
},
end: {
line: 37,
column: 33
}
},
'4': {
start: {
line: 23,
column: 4
},
end: {
line: 23,
column: 30
}
},
'5': {
start: {
line: 25,
column: 4
},
end: {
line: 34,
column: 5
}
},
'6': {
start: {
line: 26,
column: 6
},
end: {
line: 26,
column: 23
}
},
'7': {
start: {
line: 28,
column: 6
},
end: {
line: 28,
column: 51
}
},
'8': {
start: {
line: 30,
column: 6
},
end: {
line: 30,
column: 28
}
},
'9': {
start: {
line: 32,
column: 6
},
end: {
line: 32,
column: 38
}
},
'10': {
start: {
line: 33,
column: 6
},
end: {
line: 33,
column: 37
}
},
'11': {
start: {
line: 36,
column: 4
},
end: {
line: 36,
column: 23
}
},
'12': {
start: {
line: 39,
column: 2
},
end: {
line: 39,
column: 16
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 16
}
},
loc: {
start: {
line: 10,
column: 32
},
end: {
line: 40,
column: 1
}
}
}
},
branchMap: {
'0': {
loc: {
start: {
line: 25,
column: 4
},
end: {
line: 34,
column: 5
}
},
type: 'if',
locations: [{
start: {
line: 25,
column: 4
},
end: {
line: 34,
column: 5
}
}, {
start: {
line: 25,
column: 4
},
end: {
line: 34,
column: 5
}
}]
}
},
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
},
f: {
'0': 0
},
b: {
'0': [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');

@@ -258,47 +28,30 @@

exports.default = (input, size) => {
++cov_2in591hdkb.f[0];
let subject;
++cov_2in591hdkb.s[0];
subject = input;
const chunks = (++cov_2in591hdkb.s[1], []);
const chunks = [];
// https://regex101.com/r/gY5kZ1/1
const re = (++cov_2in591hdkb.s[2], new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))'));
const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))');
++cov_2in591hdkb.s[3];
do {
let chunk;
++cov_2in591hdkb.s[4];
chunk = subject.match(re);
++cov_2in591hdkb.s[5];
if (chunk) {
++cov_2in591hdkb.b[0][0];
++cov_2in591hdkb.s[6];
chunk = chunk[0];
++cov_2in591hdkb.s[7];
subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk));
++cov_2in591hdkb.s[8];
chunk = _lodash2.default.trim(chunk);
} else {
++cov_2in591hdkb.b[0][1];
++cov_2in591hdkb.s[9];
chunk = (0, _sliceAnsi2.default)(subject, 0, size);
++cov_2in591hdkb.s[10];
subject = (0, _sliceAnsi2.default)(subject, size);
}
++cov_2in591hdkb.s[11];
chunks.push(chunk);
} while ((0, _stringWidth2.default)(subject));
++cov_2in591hdkb.s[12];
return chunks;

@@ -305,0 +58,0 @@ };

3

package.json

@@ -65,5 +65,6 @@ {

"precommit": "npm run lint && npm run test",
"prepublish": "NODE_ENV=production npm run build",
"test": "npm run build && nyc --check-coverage mocha"
},
"version": "3.8.2"
"version": "3.8.3"
}
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