table 6.7.4 → 6.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/dist/test/README/api/getBorderCharacters.d.ts +0 -1
- package/dist/test/README/api/getBorderCharacters.js +0 -76
- package/dist/test/README/api/stream/streaming.d.ts +0 -1
- package/dist/test/README/api/stream/streaming.js +0 -41
- package/dist/test/README/api/table/border.d.ts +0 -1
- package/dist/test/README/api/table/border.js +0 -45
- package/dist/test/README/api/table/column/alignment.d.ts +0 -1
- package/dist/test/README/api/table/column/alignment.js +0 -34
- package/dist/test/README/api/table/column/padding.d.ts +0 -1
- package/dist/test/README/api/table/column/padding.js +0 -36
- package/dist/test/README/api/table/column/truncate.d.ts +0 -1
- package/dist/test/README/api/table/column/truncate.js +0 -29
- package/dist/test/README/api/table/column/verticalAlignment.d.ts +0 -1
- package/dist/test/README/api/table/column/verticalAlignment.js +0 -28
- package/dist/test/README/api/table/column/width.d.ts +0 -1
- package/dist/test/README/api/table/column/width.js +0 -30
- package/dist/test/README/api/table/column/wrapWord.d.ts +0 -1
- package/dist/test/README/api/table/column/wrapWord.js +0 -51
- package/dist/test/README/api/table/drawHorizontalLine.d.ts +0 -1
- package/dist/test/README/api/table/drawHorizontalLine.js +0 -33
- package/dist/test/README/api/table/drawVerticalLine.d.ts +0 -1
- package/dist/test/README/api/table/drawVerticalLine.js +0 -35
- package/dist/test/README/api/table/header.d.ts +0 -1
- package/dist/test/README/api/table/header.js +0 -35
- package/dist/test/README/api/table/singleLine.d.ts +0 -1
- package/dist/test/README/api/table/singleLine.js +0 -35
- package/dist/test/README/demo.d.ts +0 -1
- package/dist/test/README/demo.js +0 -71
- package/dist/test/README/usage.d.ts +0 -1
- package/dist/test/README/usage.js +0 -24
- package/dist/test/alignString.d.ts +0 -1
- package/dist/test/alignString.js +0 -124
- package/dist/test/alignTableData.d.ts +0 -1
- package/dist/test/alignTableData.js +0 -63
- package/dist/test/calculateCellHeight.d.ts +0 -1
- package/dist/test/calculateCellHeight.js +0 -28
- package/dist/test/calculateCellWidths.d.ts +0 -1
- package/dist/test/calculateCellWidths.js +0 -27
- package/dist/test/calculateColumnWidths.d.ts +0 -1
- package/dist/test/calculateColumnWidths.js +0 -54
- package/dist/test/calculateRowHeights.d.ts +0 -1
- package/dist/test/calculateRowHeights.js +0 -61
- package/dist/test/createStream.d.ts +0 -1
- package/dist/test/createStream.js +0 -122
- package/dist/test/drawBorder.d.ts +0 -1
- package/dist/test/drawBorder.js +0 -139
- package/dist/test/drawHeader.d.ts +0 -1
- package/dist/test/drawHeader.js +0 -172
- package/dist/test/drawRow.d.ts +0 -1
- package/dist/test/drawRow.js +0 -54
- package/dist/test/getBorderCharacters.d.ts +0 -1
- package/dist/test/getBorderCharacters.js +0 -104
- package/dist/test/makeConfig.d.ts +0 -1
- package/dist/test/makeConfig.js +0 -152
- package/dist/test/makeStreamConfig.d.ts +0 -1
- package/dist/test/makeStreamConfig.js +0 -106
- package/dist/test/mapDataUsingRowHeights.d.ts +0 -1
- package/dist/test/mapDataUsingRowHeights.js +0 -150
- package/dist/test/padTableData.d.ts +0 -1
- package/dist/test/padTableData.js +0 -62
- package/dist/test/streamConfigSamples.d.ts +0 -6
- package/dist/test/streamConfigSamples.js +0 -287
- package/dist/test/stringifyTableData.d.ts +0 -1
- package/dist/test/stringifyTableData.js +0 -17
- package/dist/test/table.d.ts +0 -1
- package/dist/test/table.js +0 -171
- package/dist/test/tableConfigSamples.d.ts +0 -5
- package/dist/test/tableConfigSamples.js +0 -202
- package/dist/test/truncateTableData.d.ts +0 -1
- package/dist/test/truncateTableData.js +0 -92
- package/dist/test/utils.d.ts +0 -7
- package/dist/test/utils.js +0 -23
- package/dist/test/validateConfig.d.ts +0 -1
- package/dist/test/validateConfig.js +0 -36
- package/dist/test/validateStreamConfig.d.ts +0 -1
- package/dist/test/validateStreamConfig.js +0 -39
- package/dist/test/validateTableConfig.d.ts +0 -1
- package/dist/test/validateTableConfig.js +0 -35
- package/dist/test/validateTableData.d.ts +0 -1
- package/dist/test/validateTableData.js +0 -106
- package/dist/test/wrapCell.d.ts +0 -1
- package/dist/test/wrapCell.js +0 -114
- package/dist/test/wrapString.d.ts +0 -1
- package/dist/test/wrapString.js +0 -45
- package/dist/test/wrapWord.d.ts +0 -1
- package/dist/test/wrapWord.js +0 -94
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable max-nested-callbacks */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const chai_1 = require("chai");
|
|
5
|
-
const makeStreamConfig_1 = require("../src/makeStreamConfig");
|
|
6
|
-
const baseStreamConfig = {
|
|
7
|
-
columnCount: 1,
|
|
8
|
-
columnDefault: {
|
|
9
|
-
width: 5,
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
describe('makeStreamConfig', () => {
|
|
13
|
-
it('does not affect the parameter configuration object', () => {
|
|
14
|
-
(0, makeStreamConfig_1.makeStreamConfig)(baseStreamConfig);
|
|
15
|
-
(0, chai_1.expect)(baseStreamConfig).to.equal(baseStreamConfig);
|
|
16
|
-
});
|
|
17
|
-
context('columnDefault', () => {
|
|
18
|
-
context('not contains width', () => {
|
|
19
|
-
it('throws an error', () => {
|
|
20
|
-
(0, chai_1.expect)(() => {
|
|
21
|
-
return (0, makeStreamConfig_1.makeStreamConfig)({ columnCount: 2,
|
|
22
|
-
columnDefault: {} });
|
|
23
|
-
}).to.be.throw('Must provide config.columnDefault.width when creating a stream.');
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
context('column', () => {
|
|
28
|
-
context('alignment', () => {
|
|
29
|
-
context('is not provided', () => {
|
|
30
|
-
it('defaults to "left"', () => {
|
|
31
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)(baseStreamConfig);
|
|
32
|
-
(0, chai_1.expect)(config.columns[0].alignment).to.equal('left');
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
context('is provided', () => {
|
|
36
|
-
it('uses the custom value', () => {
|
|
37
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)({ ...baseStreamConfig,
|
|
38
|
-
columns: {
|
|
39
|
-
0: {
|
|
40
|
-
alignment: 'center',
|
|
41
|
-
},
|
|
42
|
-
} });
|
|
43
|
-
(0, chai_1.expect)(config.columns[0].alignment).to.equal('center');
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
context('paddingLeft', () => {
|
|
48
|
-
context('is not provided', () => {
|
|
49
|
-
it('defaults to 1', () => {
|
|
50
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)(baseStreamConfig);
|
|
51
|
-
(0, chai_1.expect)(config.columns[0].paddingLeft).to.equal(1);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
context('is provided', () => {
|
|
55
|
-
it('uses the custom value', () => {
|
|
56
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)({ ...baseStreamConfig,
|
|
57
|
-
columns: {
|
|
58
|
-
0: {
|
|
59
|
-
paddingLeft: 3,
|
|
60
|
-
},
|
|
61
|
-
} });
|
|
62
|
-
(0, chai_1.expect)(config.columns[0].paddingLeft).to.equal(3);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
context('paddingRight', () => {
|
|
67
|
-
context('is not provided', () => {
|
|
68
|
-
it('defaults to 1', () => {
|
|
69
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)(baseStreamConfig);
|
|
70
|
-
(0, chai_1.expect)(config.columns[0].paddingRight).to.equal(1);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
context('is provided', () => {
|
|
74
|
-
it('uses the custom value', () => {
|
|
75
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)({ ...baseStreamConfig,
|
|
76
|
-
columns: {
|
|
77
|
-
0: {
|
|
78
|
-
paddingRight: 3,
|
|
79
|
-
},
|
|
80
|
-
} });
|
|
81
|
-
(0, chai_1.expect)(config.columns[0].paddingRight).to.equal(3);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
context('"drawVerticalLine', () => {
|
|
87
|
-
context('is not provided', () => {
|
|
88
|
-
it('defaults to retuning true', () => {
|
|
89
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)(baseStreamConfig);
|
|
90
|
-
(0, chai_1.expect)(config.drawVerticalLine(-1, -1)).to.equal(true);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
context('is provided', () => {
|
|
94
|
-
it('uses the custom function', () => {
|
|
95
|
-
const config = (0, makeStreamConfig_1.makeStreamConfig)({
|
|
96
|
-
...baseStreamConfig,
|
|
97
|
-
drawVerticalLine: () => {
|
|
98
|
-
return false;
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
(0, chai_1.expect)(config.drawVerticalLine(-1, -1)).to.equal(false);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
//# sourceMappingURL=makeStreamConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const chai_1 = require("chai");
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const makeTableConfig_1 = require("../src/makeTableConfig");
|
|
9
|
-
const mapDataUsingRowHeights_1 = require("../src/mapDataUsingRowHeights");
|
|
10
|
-
describe('mapDataUsingRowHeights', () => {
|
|
11
|
-
context('no data spans multiple rows', () => {
|
|
12
|
-
it('maps data to a single cell', () => {
|
|
13
|
-
const rowHeights = [1];
|
|
14
|
-
const data = [
|
|
15
|
-
['aa'],
|
|
16
|
-
];
|
|
17
|
-
const config = (0, makeTableConfig_1.makeTableConfig)(data, {
|
|
18
|
-
columns: {
|
|
19
|
-
0: {
|
|
20
|
-
width: 2,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
const mappedData = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(data, rowHeights, config);
|
|
25
|
-
(0, chai_1.expect)(mappedData).to.deep.equal([
|
|
26
|
-
['aa'],
|
|
27
|
-
]);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
context('single cell spans multiple rows', () => {
|
|
31
|
-
it('maps data to multiple rows', () => {
|
|
32
|
-
const rowHeights = [5];
|
|
33
|
-
const data = [
|
|
34
|
-
['aabbccddee'],
|
|
35
|
-
];
|
|
36
|
-
const config = (0, makeTableConfig_1.makeTableConfig)(data, {
|
|
37
|
-
columns: {
|
|
38
|
-
0: {
|
|
39
|
-
width: 2,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
const mappedData = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(data, rowHeights, config);
|
|
44
|
-
(0, chai_1.expect)(mappedData).to.deep.equal([
|
|
45
|
-
['aa'],
|
|
46
|
-
['bb'],
|
|
47
|
-
['cc'],
|
|
48
|
-
['dd'],
|
|
49
|
-
['ee'],
|
|
50
|
-
]);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
context('single cell contains newlines', () => {
|
|
54
|
-
it('maps data to multiple rows', () => {
|
|
55
|
-
const rowHeights = [5];
|
|
56
|
-
const data = [
|
|
57
|
-
[
|
|
58
|
-
'aa\nbb\ncc\ndd\nee',
|
|
59
|
-
],
|
|
60
|
-
];
|
|
61
|
-
const config = (0, makeTableConfig_1.makeTableConfig)(data, {
|
|
62
|
-
columns: {
|
|
63
|
-
0: {
|
|
64
|
-
width: 100,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
const mappedData = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(data, rowHeights, config);
|
|
69
|
-
(0, chai_1.expect)(mappedData).to.deep.equal([
|
|
70
|
-
['aa'],
|
|
71
|
-
['bb'],
|
|
72
|
-
['cc'],
|
|
73
|
-
['dd'],
|
|
74
|
-
['ee'],
|
|
75
|
-
]);
|
|
76
|
-
});
|
|
77
|
-
it('maps data with color coding to multiple rows', () => {
|
|
78
|
-
const rowHeights = [
|
|
79
|
-
5,
|
|
80
|
-
];
|
|
81
|
-
const data = [
|
|
82
|
-
[
|
|
83
|
-
chalk_1.default.red('aa\nbb\ncc\ndd\nee'),
|
|
84
|
-
],
|
|
85
|
-
];
|
|
86
|
-
const config = (0, makeTableConfig_1.makeTableConfig)(data, {
|
|
87
|
-
columns: {
|
|
88
|
-
0: {
|
|
89
|
-
width: 100,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
const mappedData = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(data, rowHeights, config);
|
|
94
|
-
(0, chai_1.expect)(mappedData).to.deep.equal([
|
|
95
|
-
[chalk_1.default.red('aa')],
|
|
96
|
-
[chalk_1.default.red('bb')],
|
|
97
|
-
[chalk_1.default.red('cc')],
|
|
98
|
-
[chalk_1.default.red('dd')],
|
|
99
|
-
[chalk_1.default.red('ee')],
|
|
100
|
-
]);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
context('multiple cells spans multiple rows', () => {
|
|
104
|
-
it('maps data to multiple rows', () => {
|
|
105
|
-
const rowHeights = [
|
|
106
|
-
5,
|
|
107
|
-
];
|
|
108
|
-
const data = [
|
|
109
|
-
[
|
|
110
|
-
'aabbccddee',
|
|
111
|
-
'00001111',
|
|
112
|
-
],
|
|
113
|
-
];
|
|
114
|
-
const config = (0, makeTableConfig_1.makeTableConfig)(data, {
|
|
115
|
-
columns: {
|
|
116
|
-
0: {
|
|
117
|
-
width: 2,
|
|
118
|
-
},
|
|
119
|
-
1: {
|
|
120
|
-
width: 4,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
const mappedData = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(data, rowHeights, config);
|
|
125
|
-
(0, chai_1.expect)(mappedData).to.deep.equal([
|
|
126
|
-
[
|
|
127
|
-
'aa',
|
|
128
|
-
'0000',
|
|
129
|
-
],
|
|
130
|
-
[
|
|
131
|
-
'bb',
|
|
132
|
-
'1111',
|
|
133
|
-
],
|
|
134
|
-
[
|
|
135
|
-
'cc',
|
|
136
|
-
'',
|
|
137
|
-
],
|
|
138
|
-
[
|
|
139
|
-
'dd',
|
|
140
|
-
'',
|
|
141
|
-
],
|
|
142
|
-
[
|
|
143
|
-
'ee',
|
|
144
|
-
'',
|
|
145
|
-
],
|
|
146
|
-
]);
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
//# sourceMappingURL=mapDataUsingRowHeights.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable max-nested-callbacks */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const chai_1 = require("chai");
|
|
5
|
-
const makeTableConfig_1 = require("../src/makeTableConfig");
|
|
6
|
-
const padTableData_1 = require("../src/padTableData");
|
|
7
|
-
describe('padTableData', () => {
|
|
8
|
-
context('when no given userConfig', () => {
|
|
9
|
-
it('inserts 01 whitespace character regardless of string whitespaces', () => {
|
|
10
|
-
const rows = [[' a ']];
|
|
11
|
-
(0, chai_1.expect)((0, padTableData_1.padTableData)(rows, (0, makeTableConfig_1.makeTableConfig)(rows, undefined))).to.deep.equal([[' a ']]);
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
context('when given paddings in columnDefault', () => {
|
|
15
|
-
context('when no given column-specific paddings', () => {
|
|
16
|
-
it('uses the columnDefault values', () => {
|
|
17
|
-
const rows = [['a']];
|
|
18
|
-
(0, chai_1.expect)((0, padTableData_1.padTableData)(rows, (0, makeTableConfig_1.makeTableConfig)(rows, { columnDefault: {
|
|
19
|
-
paddingLeft: 2,
|
|
20
|
-
paddingRight: 3,
|
|
21
|
-
} }))).to.deep.equal([[' a ']]);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
context('when given column-specific padding values', () => {
|
|
25
|
-
it('uses column-specific padding values', () => {
|
|
26
|
-
const rows = [['a']];
|
|
27
|
-
(0, chai_1.expect)((0, padTableData_1.padTableData)(rows, (0, makeTableConfig_1.makeTableConfig)(rows, {
|
|
28
|
-
columnDefault: {
|
|
29
|
-
paddingLeft: 2,
|
|
30
|
-
paddingRight: 3,
|
|
31
|
-
},
|
|
32
|
-
columns: {
|
|
33
|
-
0: {
|
|
34
|
-
paddingLeft: 4,
|
|
35
|
-
paddingRight: 5,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
}))).to.deep.equal([[' a ']]);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
context('when given multiple rows and columns', () => {
|
|
43
|
-
it('uses corresponding column-specific padding values or fallback to the default padding values', () => {
|
|
44
|
-
const rows = [['a', 'b'], ['c', 'd']];
|
|
45
|
-
(0, chai_1.expect)((0, padTableData_1.padTableData)(rows, (0, makeTableConfig_1.makeTableConfig)(rows, {
|
|
46
|
-
columnDefault: {
|
|
47
|
-
paddingLeft: 2,
|
|
48
|
-
paddingRight: 3,
|
|
49
|
-
},
|
|
50
|
-
columns: {
|
|
51
|
-
0: {
|
|
52
|
-
paddingLeft: 4,
|
|
53
|
-
},
|
|
54
|
-
1: {
|
|
55
|
-
paddingRight: 5,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
}))).to.deep.equal([[' a ', ' b '], [' c ', ' d ']]);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=padTableData.js.map
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const streamConfigSamples = {
|
|
4
|
-
invalid: [
|
|
5
|
-
{},
|
|
6
|
-
{ border: 1 },
|
|
7
|
-
{ border: { unknown: '-' } },
|
|
8
|
-
{ border: { topBody: 1 } },
|
|
9
|
-
{ border: { topJoin: 1 } },
|
|
10
|
-
{ border: { topLeft: 1 } },
|
|
11
|
-
{ border: { topRight: 1 } },
|
|
12
|
-
{ border: { bottomBody: 1 } },
|
|
13
|
-
{ border: { bottomJoin: 1 } },
|
|
14
|
-
{ border: { bottomLeft: 1 } },
|
|
15
|
-
{ border: { bottomRight: 1 } },
|
|
16
|
-
{ border: { bodyLeft: 1 } },
|
|
17
|
-
{ border: { bodyRight: 1 } },
|
|
18
|
-
{ border: { bodyJoin: 1 } },
|
|
19
|
-
{ border: { joinBody: 1 } },
|
|
20
|
-
{ border: { joinLeft: 1 } },
|
|
21
|
-
{ border: { joinRight: 1 } },
|
|
22
|
-
{ border: { joinJoin: 1 } },
|
|
23
|
-
{ columns: 1 },
|
|
24
|
-
{ columns: { a: { width: 5 } } },
|
|
25
|
-
{ columns: { 1: 1 } },
|
|
26
|
-
{ columns: { 1: { unknown: 1 } } },
|
|
27
|
-
{ columns: { 1: { alignment: 1 } } },
|
|
28
|
-
{ columns: { 1: { alignment: '1' } } },
|
|
29
|
-
{ columns: { 1: { width: '5' } } },
|
|
30
|
-
{ columns: { 1: { wrapWord: 1 } } },
|
|
31
|
-
{ columns: { 1: { truncate: '1' } } },
|
|
32
|
-
{ columns: { 1: { paddingLeft: '1' } } },
|
|
33
|
-
{ columns: { 1: { paddingRight: '1' } } },
|
|
34
|
-
{ columnCount: 3,
|
|
35
|
-
columnDefault: {
|
|
36
|
-
width: 50,
|
|
37
|
-
},
|
|
38
|
-
columns: [1] },
|
|
39
|
-
{ columnCount: 3,
|
|
40
|
-
columnDefault: {
|
|
41
|
-
width: 50,
|
|
42
|
-
},
|
|
43
|
-
columns: [''] },
|
|
44
|
-
{ columnCount: 3,
|
|
45
|
-
columnDefault: {
|
|
46
|
-
width: 50,
|
|
47
|
-
},
|
|
48
|
-
columns: [{ unknown: 1 }] },
|
|
49
|
-
{ columnDefault: 1 },
|
|
50
|
-
{ columnDefault: { unknown: 1 } },
|
|
51
|
-
{ columnDefault: { alignment: 1 } },
|
|
52
|
-
{ columnDefault: { alignment: '1' } },
|
|
53
|
-
{ columnDefault: { width: '5' } },
|
|
54
|
-
{ columnDefault: { wrapWord: 1 } },
|
|
55
|
-
{ columnDefault: { truncate: '1' } },
|
|
56
|
-
{ columnDefault: { paddingLeft: '1' } },
|
|
57
|
-
{ columnDefault: { paddingRight: '1' } },
|
|
58
|
-
{ unknown: 1 },
|
|
59
|
-
{
|
|
60
|
-
columnCount: 3,
|
|
61
|
-
columnDefault: { width: 20 },
|
|
62
|
-
columns: { 0: { alignment: 'middle' } },
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
columnCount: 3,
|
|
66
|
-
columnDefault: { width: 20,
|
|
67
|
-
wrapWord: 'true' },
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
columnCount: 3,
|
|
71
|
-
columnDefault: { width: 20 },
|
|
72
|
-
columns: { 0: { wrapWord: 'true' } },
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
columnCount: 3,
|
|
76
|
-
columnDefault: { width: 20 },
|
|
77
|
-
columns: { 0: { wrapWord: 1 } },
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
columnCount: 1,
|
|
81
|
-
columnDefault: { width: 2 },
|
|
82
|
-
columns: { 0: { width: 0 } },
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
columnCount: 1,
|
|
86
|
-
columnDefault: { width: 2 },
|
|
87
|
-
columns: { 0: { width: 1.5 } },
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
columnCount: 1,
|
|
91
|
-
columnDefault: { width: 0 },
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
columnCount: 1,
|
|
95
|
-
columnDefault: { width: 1.5 },
|
|
96
|
-
},
|
|
97
|
-
{ border: { topBody: '-' } },
|
|
98
|
-
{ border: { topJoin: '-' } },
|
|
99
|
-
{ border: { topLeft: '-' } },
|
|
100
|
-
{ border: { topRight: '-' } },
|
|
101
|
-
{ border: { bottomBody: '-' } },
|
|
102
|
-
{ border: { bottomJoin: '-' } },
|
|
103
|
-
{ border: { bottomLeft: '-' } },
|
|
104
|
-
{ border: { bottomRight: '-' } },
|
|
105
|
-
{ border: { bodyLeft: '-' } },
|
|
106
|
-
{ border: { bodyRight: '-' } },
|
|
107
|
-
{ border: { bodyJoin: '-' } },
|
|
108
|
-
{ border: { joinBody: '-' } },
|
|
109
|
-
{ border: { joinLeft: '-' } },
|
|
110
|
-
{ border: { joinRight: '-' } },
|
|
111
|
-
{ border: { joinJoin: '-' } },
|
|
112
|
-
{ columns: { 1: { alignment: 'left' } } },
|
|
113
|
-
{ columns: { 1: { width: 5 } } },
|
|
114
|
-
{ columns: { 1: { wrapWord: true } } },
|
|
115
|
-
{ columns: { 1: { truncate: 1 } } },
|
|
116
|
-
{ columns: { 1: { paddingLeft: 1 } } },
|
|
117
|
-
{ columns: { 1: { paddingRight: 1 } } },
|
|
118
|
-
{ columnDefault: { alignment: 'left' } },
|
|
119
|
-
{ columnDefault: { width: 5 } },
|
|
120
|
-
{ columnDefault: { wrapWord: true } },
|
|
121
|
-
{ columnDefault: { truncate: 1 } },
|
|
122
|
-
{ columnDefault: { paddingLeft: 1 } },
|
|
123
|
-
{ columnDefault: { paddingRight: 1 } },
|
|
124
|
-
],
|
|
125
|
-
valid: [
|
|
126
|
-
{
|
|
127
|
-
columnCount: 1,
|
|
128
|
-
columnDefault: { width: 1 },
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
columnCount: 3,
|
|
132
|
-
columnDefault: { width: 20 },
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
columnCount: 1,
|
|
136
|
-
columnDefault: { width: 1 },
|
|
137
|
-
columns: { 0: { width: 1 } },
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
columnCount: 1,
|
|
141
|
-
columnDefault: { width: 5 },
|
|
142
|
-
columns: { 0: { width: 5 } },
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
columnCount: 3,
|
|
146
|
-
columnDefault: { width: 20 },
|
|
147
|
-
columns: { 0: { alignment: 'left' } },
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
columnCount: 3,
|
|
151
|
-
columnDefault: { width: 20 },
|
|
152
|
-
columns: { 1: { alignment: 'right' } },
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
columnCount: 3,
|
|
156
|
-
columnDefault: { width: 20 },
|
|
157
|
-
columns: { 2: { alignment: 'center' } },
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
columnCount: 3,
|
|
161
|
-
columnDefault: { width: 20 },
|
|
162
|
-
columns: { 2: { alignment: 'justify' } },
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
columnCount: 3,
|
|
166
|
-
columnDefault: {
|
|
167
|
-
width: 20,
|
|
168
|
-
},
|
|
169
|
-
columns: {
|
|
170
|
-
0: {
|
|
171
|
-
alignment: 'left',
|
|
172
|
-
width: 10,
|
|
173
|
-
},
|
|
174
|
-
1: {
|
|
175
|
-
alignment: 'center',
|
|
176
|
-
width: 10,
|
|
177
|
-
},
|
|
178
|
-
2: {
|
|
179
|
-
alignment: 'right',
|
|
180
|
-
width: 10,
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
border: {
|
|
186
|
-
bodyJoin: '│',
|
|
187
|
-
bodyLeft: '│',
|
|
188
|
-
bodyRight: '│',
|
|
189
|
-
bottomBody: '─',
|
|
190
|
-
bottomJoin: '┴',
|
|
191
|
-
bottomLeft: '└',
|
|
192
|
-
bottomRight: '┘',
|
|
193
|
-
joinBody: '─',
|
|
194
|
-
joinJoin: '┼',
|
|
195
|
-
joinLeft: '├',
|
|
196
|
-
joinRight: '┤',
|
|
197
|
-
topBody: '─',
|
|
198
|
-
topJoin: '┬',
|
|
199
|
-
topLeft: '┌',
|
|
200
|
-
topRight: '┐',
|
|
201
|
-
},
|
|
202
|
-
columnCount: 1,
|
|
203
|
-
columnDefault: {
|
|
204
|
-
width: 10,
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
columnCount: 1,
|
|
209
|
-
columnDefault: {
|
|
210
|
-
width: 2,
|
|
211
|
-
},
|
|
212
|
-
columns: {
|
|
213
|
-
0: {
|
|
214
|
-
paddingLeft: 3,
|
|
215
|
-
},
|
|
216
|
-
1: {
|
|
217
|
-
paddingRight: 3,
|
|
218
|
-
width: 2,
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
border: {},
|
|
224
|
-
columnCount: 1,
|
|
225
|
-
columnDefault: {
|
|
226
|
-
paddingLeft: 0,
|
|
227
|
-
paddingRight: 1,
|
|
228
|
-
width: 2,
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
columnCount: 3,
|
|
233
|
-
columnDefault: {
|
|
234
|
-
width: 50,
|
|
235
|
-
},
|
|
236
|
-
columns: {
|
|
237
|
-
0: {
|
|
238
|
-
alignment: 'right',
|
|
239
|
-
width: 10,
|
|
240
|
-
},
|
|
241
|
-
1: {
|
|
242
|
-
alignment: 'center',
|
|
243
|
-
},
|
|
244
|
-
2: {
|
|
245
|
-
width: 10,
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
columnCount: 3,
|
|
251
|
-
columnDefault: { width: 20,
|
|
252
|
-
wrapWord: true },
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
columnCount: 3,
|
|
256
|
-
columnDefault: { width: 20 },
|
|
257
|
-
columns: { 0: { wrapWord: true } },
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
columnCount: 3,
|
|
261
|
-
columnDefault: { width: 20 },
|
|
262
|
-
columns: { 0: { wrapWord: false } },
|
|
263
|
-
},
|
|
264
|
-
{ columnCount: 3,
|
|
265
|
-
columnDefault: {
|
|
266
|
-
width: 50,
|
|
267
|
-
},
|
|
268
|
-
columns: [] },
|
|
269
|
-
{ columnCount: 3,
|
|
270
|
-
columnDefault: {
|
|
271
|
-
width: 50,
|
|
272
|
-
},
|
|
273
|
-
columns: [{ width: 5 }] },
|
|
274
|
-
{ columnCount: 3,
|
|
275
|
-
columnDefault: {
|
|
276
|
-
width: 50,
|
|
277
|
-
},
|
|
278
|
-
columns: [{ wrapWord: true }, { truncate: 1 }] },
|
|
279
|
-
{ columnCount: 3,
|
|
280
|
-
columnDefault: {
|
|
281
|
-
width: 50,
|
|
282
|
-
},
|
|
283
|
-
columns: [{ paddingLeft: 1 }, { paddingRight: 1 }, { alignment: 'right' }] },
|
|
284
|
-
],
|
|
285
|
-
};
|
|
286
|
-
exports.default = streamConfigSamples;
|
|
287
|
-
//# sourceMappingURL=streamConfigSamples.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const chai_1 = require("chai");
|
|
4
|
-
const stringifyTableData_1 = require("../src/stringifyTableData");
|
|
5
|
-
describe('stringifyTableData', () => {
|
|
6
|
-
it('converts all cell values to strings', () => {
|
|
7
|
-
const rows = [[null, undefined, true, false],
|
|
8
|
-
[0, -3.14159, Number.NaN, Number.POSITIVE_INFINITY],
|
|
9
|
-
[['a', 'b'], { cd: 1 }]];
|
|
10
|
-
(0, chai_1.expect)((0, stringifyTableData_1.stringifyTableData)(rows)).to.deep.equal([
|
|
11
|
-
['null', 'undefined', 'true', 'false'],
|
|
12
|
-
['0', '-3.14159', 'NaN', 'Infinity'],
|
|
13
|
-
['a,b', '[object Object]'],
|
|
14
|
-
]);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=stringifyTableData.js.map
|
package/dist/test/table.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|