console-table-printer 2.11.1 → 2.12.0
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/README.md +21 -23
- package/dist/src/internalTable/input-converter.js +4 -1
- package/dist/src/internalTable/internal-table.js +25 -22
- package/dist/src/models/common.d.ts +2 -2
- package/dist/src/models/external-table.d.ts +3 -2
- package/dist/src/models/internal-table.d.ts +3 -3
- package/dist/src/utils/colored-console-line.d.ts +1 -1
- package/dist/src/utils/colored-console-line.js +0 -1
- package/dist/src/utils/console-utils.d.ts +1 -1
- package/dist/src/utils/console-utils.js +4 -4
- package/dist/src/utils/string-utils.d.ts +1 -1
- package/dist/src/utils/string-utils.js +34 -30
- package/dist/src/utils/table-constants.js +0 -1
- package/dist/src/utils/table-helpers.js +8 -8
- package/package.json +15 -16
package/README.md
CHANGED
|
@@ -37,15 +37,15 @@ const { printTable } = require('console-table-printer');
|
|
|
37
37
|
|
|
38
38
|
//Create a table
|
|
39
39
|
const testCases = [
|
|
40
|
-
{
|
|
41
|
-
{
|
|
40
|
+
{ Rank: 3, text: 'I would like some Yellow', value: 100 },
|
|
41
|
+
{ Rank: 4, text: 'I hope batch update is working', value: 300 },
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
//print
|
|
45
45
|
printTable(testCases);
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-

|
|
49
49
|
|
|
50
50
|
## 🚨🚨Announcement🚨🚨 Official Documentation is moved [Here](https://console-table.netlify.app/docs)
|
|
51
51
|
|
|
@@ -57,39 +57,39 @@ const { Table } = require('console-table-printer');
|
|
|
57
57
|
//Create a table
|
|
58
58
|
const p = new Table();
|
|
59
59
|
|
|
60
|
-
//add rows with color
|
|
61
|
-
p.addRow({
|
|
62
|
-
p.addRow({
|
|
60
|
+
// add rows with color
|
|
61
|
+
p.addRow({ Record: 'a', text: 'red wine please', value: 10.212 });
|
|
62
|
+
p.addRow({ Record: 'b', text: 'green gemuse please', value: 20.0 });
|
|
63
63
|
p.addRows([
|
|
64
|
-
//adding multiple rows are possible
|
|
65
|
-
{
|
|
66
|
-
{
|
|
64
|
+
// adding multiple rows are possible
|
|
65
|
+
{ Record: 'c', text: 'gelb bananen bitte', value: 100 },
|
|
66
|
+
{ Record: 'd', text: 'update is working', value: 300 },
|
|
67
67
|
]);
|
|
68
68
|
|
|
69
69
|
//print
|
|
70
70
|
p.printTable();
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-

|
|
74
74
|
|
|
75
75
|
You can also put some color to your table like this:
|
|
76
76
|
|
|
77
77
|
```javascript
|
|
78
78
|
const p = new Table();
|
|
79
|
-
p.addRow({
|
|
80
|
-
p.addRow({
|
|
81
|
-
p.addRow({
|
|
79
|
+
p.addRow({ description: 'red wine', value: 10.212 }, { color: 'red' });
|
|
80
|
+
p.addRow({ description: 'green gemuse', value: 20.0 }, { color: 'green' });
|
|
81
|
+
p.addRow({ description: 'gelb bananen', value: 100 }, { color: 'yellow' });
|
|
82
82
|
p.printTable();
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-

|
|
86
86
|
|
|
87
87
|
You can also put properties based on columns (color/alignment/title)
|
|
88
88
|
|
|
89
89
|
```javascript
|
|
90
90
|
const p = new Table({
|
|
91
91
|
columns: [
|
|
92
|
-
{ name: '
|
|
92
|
+
{ name: 'id', alignment: 'left', color: 'blue' }, // with alignment and color
|
|
93
93
|
{ name: 'text', alignment: 'right' },
|
|
94
94
|
{ name: 'is_priority_today', title: 'Is This Priority?' }, // with Title as separate Text
|
|
95
95
|
],
|
|
@@ -98,23 +98,21 @@ const p = new Table({
|
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
p.addRow({
|
|
101
|
+
p.addRow({ id: 1, text: 'red wine', value: 10.212 }, { color: 'green' });
|
|
102
102
|
p.addRow(
|
|
103
|
-
{
|
|
103
|
+
{ id: 2, text: 'green gemuse', value: 20.0 },
|
|
104
104
|
{ color: 'custom_green' } // your green
|
|
105
105
|
);
|
|
106
106
|
p.addRow(
|
|
107
|
-
{
|
|
107
|
+
{ id: 3, text: 'gelb bananen', value: 100, is_priority_today: 'Y' },
|
|
108
108
|
{ color: 'yellow' }
|
|
109
109
|
);
|
|
110
|
-
p.addRow(
|
|
111
|
-
|
|
112
|
-
{ color: 'cyan' }
|
|
113
|
-
);
|
|
110
|
+
p.addRow({ id: 3, text: 'rosa hemd wie immer', value: 100 }, { color: 'cyan' });
|
|
111
|
+
|
|
114
112
|
p.printTable();
|
|
115
113
|
```
|
|
116
114
|
|
|
117
|
-

|
|
118
116
|
|
|
119
117
|
## CLI
|
|
120
118
|
|
|
@@ -11,5 +11,8 @@ const objIfExists = (key, val) => {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
exports.objIfExists = objIfExists;
|
|
14
|
-
const rawColumnToInternalColumn = (column) =>
|
|
14
|
+
const rawColumnToInternalColumn = (column) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (Object.assign(Object.assign(Object.assign(Object.assign({ name: column.name, title: (_a = column.title) !== null && _a !== void 0 ? _a : column.name }, (0, exports.objIfExists)('color', column.color)), (0, exports.objIfExists)('maxLen', column.maxLen)), (0, exports.objIfExists)('minLen', column.minLen)), { alignment: column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT }));
|
|
17
|
+
};
|
|
15
18
|
exports.rawColumnToInternalColumn = rawColumnToInternalColumn;
|
|
@@ -8,27 +8,6 @@ const internal_table_printer_1 = require("./internal-table-printer");
|
|
|
8
8
|
const DEFAULT_ROW_SORT_FUNC = () => 0;
|
|
9
9
|
const DEFAULT_ROW_FILTER_FUNC = () => true;
|
|
10
10
|
class TableInternal {
|
|
11
|
-
constructor(options) {
|
|
12
|
-
// default construction
|
|
13
|
-
this.rows = [];
|
|
14
|
-
this.columns = [];
|
|
15
|
-
this.title = undefined;
|
|
16
|
-
this.tableStyle = table_constants_1.DEFAULT_TABLE_STYLE;
|
|
17
|
-
this.filterFunction = DEFAULT_ROW_FILTER_FUNC;
|
|
18
|
-
this.sortFunction = DEFAULT_ROW_SORT_FUNC;
|
|
19
|
-
this.enabledColumns = [];
|
|
20
|
-
this.disabledColumns = [];
|
|
21
|
-
this.computedColumns = [];
|
|
22
|
-
this.rowSeparator = table_constants_1.DEFAULT_ROW_SEPARATOR;
|
|
23
|
-
this.colorMap = colored_console_line_1.DEFAULT_COLOR_MAP;
|
|
24
|
-
this.charLength = {};
|
|
25
|
-
if (options instanceof Array) {
|
|
26
|
-
this.initSimple(options);
|
|
27
|
-
}
|
|
28
|
-
else if (typeof options === 'object') {
|
|
29
|
-
this.initDetailed(options);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
11
|
initSimple(columns) {
|
|
33
12
|
this.columns = columns.map((column) => ({
|
|
34
13
|
name: column,
|
|
@@ -49,13 +28,37 @@ class TableInternal {
|
|
|
49
28
|
((_a = options === null || options === void 0 ? void 0 : options.columns) === null || _a === void 0 ? void 0 : _a.map(input_converter_1.rawColumnToInternalColumn)) || this.columns;
|
|
50
29
|
this.rowSeparator = (options === null || options === void 0 ? void 0 : options.rowSeparator) || this.rowSeparator;
|
|
51
30
|
this.charLength = (options === null || options === void 0 ? void 0 : options.charLength) || this.charLength;
|
|
52
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
31
|
+
if (options === null || options === void 0 ? void 0 : options.shouldDisableColors) {
|
|
32
|
+
this.colorMap = {};
|
|
33
|
+
}
|
|
34
|
+
else if (options === null || options === void 0 ? void 0 : options.colorMap) {
|
|
53
35
|
this.colorMap = Object.assign(Object.assign({}, this.colorMap), options.colorMap);
|
|
54
36
|
}
|
|
55
37
|
if (options.rows !== undefined) {
|
|
56
38
|
this.addRows(options.rows);
|
|
57
39
|
}
|
|
58
40
|
}
|
|
41
|
+
constructor(options) {
|
|
42
|
+
// default construction
|
|
43
|
+
this.rows = [];
|
|
44
|
+
this.columns = [];
|
|
45
|
+
this.title = undefined;
|
|
46
|
+
this.tableStyle = table_constants_1.DEFAULT_TABLE_STYLE;
|
|
47
|
+
this.filterFunction = DEFAULT_ROW_FILTER_FUNC;
|
|
48
|
+
this.sortFunction = DEFAULT_ROW_SORT_FUNC;
|
|
49
|
+
this.enabledColumns = [];
|
|
50
|
+
this.disabledColumns = [];
|
|
51
|
+
this.computedColumns = [];
|
|
52
|
+
this.rowSeparator = table_constants_1.DEFAULT_ROW_SEPARATOR;
|
|
53
|
+
this.colorMap = colored_console_line_1.DEFAULT_COLOR_MAP;
|
|
54
|
+
this.charLength = {};
|
|
55
|
+
if (options instanceof Array) {
|
|
56
|
+
this.initSimple(options);
|
|
57
|
+
}
|
|
58
|
+
else if (typeof options === 'object') {
|
|
59
|
+
this.initDetailed(options);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
59
62
|
createColumnFromRow(text) {
|
|
60
63
|
const colNames = this.columns.map((col) => col.name);
|
|
61
64
|
Object.keys(text).forEach((key) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ALIGNMENTS, COLORS } from '../utils/table-constants';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type ALIGNMENT = typeof ALIGNMENTS[number];
|
|
3
|
+
export type COLOR = typeof COLORS[number];
|
|
4
4
|
export interface Dictionary {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
@@ -13,8 +13,8 @@ export interface ColumnOptionsRaw {
|
|
|
13
13
|
export interface ComputedColumn extends ColumnOptionsRaw {
|
|
14
14
|
function: (arg0: any) => any;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type RowSortFunction = (row1: any, row2: any) => number;
|
|
17
|
+
export type RowFilterFunction = (row: any) => Boolean;
|
|
18
18
|
export interface ComplexOptions {
|
|
19
19
|
style?: TableStyleDetails;
|
|
20
20
|
title?: string;
|
|
@@ -26,6 +26,7 @@ export interface ComplexOptions {
|
|
|
26
26
|
disabledColumns?: string[];
|
|
27
27
|
computedColumns?: ComputedColumn[];
|
|
28
28
|
rowSeparator?: boolean;
|
|
29
|
+
shouldDisableColors?: boolean;
|
|
29
30
|
colorMap?: ColorMap;
|
|
30
31
|
charLength?: CharLengthDict;
|
|
31
32
|
}
|
|
@@ -8,11 +8,11 @@ export interface Column {
|
|
|
8
8
|
minLen?: number;
|
|
9
9
|
maxLen?: number;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
export
|
|
11
|
+
type TableLineDetailsKeys = 'left' | 'right' | 'mid' | 'other';
|
|
12
|
+
export type TableLineDetails = {
|
|
13
13
|
[key in TableLineDetailsKeys]: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type TableStyleDetails = {
|
|
16
16
|
headerTop: TableLineDetails;
|
|
17
17
|
headerBottom: TableLineDetails;
|
|
18
18
|
tableBottom: TableLineDetails;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findWidthInConsole = void 0;
|
|
3
|
+
exports.findWidthInConsole = exports.stripAnsi = void 0;
|
|
4
4
|
const simple_wcswidth_1 = require("simple-wcswidth");
|
|
5
5
|
/* eslint-disable no-control-regex */
|
|
6
|
-
const colorRegex = /\x1b\[\d{1,3}m/g; // \x1b[30m
|
|
6
|
+
const colorRegex = /\x1b\[\d{1,3}(;\d{1,3})*m/g; // \x1b[30m \x1b[305m \x1b[38;5m
|
|
7
7
|
const stripAnsi = (str) => str.replace(colorRegex, '');
|
|
8
|
+
exports.stripAnsi = stripAnsi;
|
|
8
9
|
const findWidthInConsole = (str, charLength) => {
|
|
9
10
|
let strLen = 0;
|
|
10
|
-
str = stripAnsi(str);
|
|
11
|
+
str = (0, exports.stripAnsi)(str);
|
|
11
12
|
if (charLength) {
|
|
12
13
|
Object.entries(charLength).forEach(([key, value]) => {
|
|
13
14
|
// count appearance of the key in the string and remove from original string
|
|
@@ -20,4 +21,3 @@ const findWidthInConsole = (str, charLength) => {
|
|
|
20
21
|
return strLen;
|
|
21
22
|
};
|
|
22
23
|
exports.findWidthInConsole = findWidthInConsole;
|
|
23
|
-
exports.default = exports.findWidthInConsole;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ALIGNMENT, CharLengthDict } from '../models/common';
|
|
2
|
+
export declare const splitTextIntoTextsOfMinLen: (inpStr: string, width: number, charLength?: CharLengthDict) => string[];
|
|
2
3
|
export declare const textWithPadding: (text: string, alignment: ALIGNMENT, columnLen: number, charLength?: CharLengthDict) => string;
|
|
3
|
-
export declare const limitWidth: (inpStr: string, width: number, charLength?: CharLengthDict) => string[];
|
|
4
4
|
export declare const biggestWordInSentence: (inpStr: string, charLength?: CharLengthDict) => number;
|
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.biggestWordInSentence = exports.
|
|
7
|
-
const console_utils_1 =
|
|
3
|
+
exports.biggestWordInSentence = exports.textWithPadding = exports.splitTextIntoTextsOfMinLen = void 0;
|
|
4
|
+
const console_utils_1 = require("./console-utils");
|
|
5
|
+
// ("How are you?",10) => ["How are ", "you?"]
|
|
6
|
+
const splitTextIntoTextsOfMinLen = (inpStr, width, charLength) => {
|
|
7
|
+
const ret = [];
|
|
8
|
+
const spaceSeparatedStrings = inpStr.split(' ');
|
|
9
|
+
let now = [];
|
|
10
|
+
let cnt = 0;
|
|
11
|
+
spaceSeparatedStrings.forEach((strWithoutSpace) => {
|
|
12
|
+
const consoleWidth = (0, console_utils_1.findWidthInConsole)(strWithoutSpace, charLength);
|
|
13
|
+
if (cnt + consoleWidth <= width) {
|
|
14
|
+
cnt += consoleWidth + 1; // 1 for the space
|
|
15
|
+
now.push(strWithoutSpace);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
ret.push(now.join(' '));
|
|
19
|
+
now = [strWithoutSpace];
|
|
20
|
+
cnt = consoleWidth + 1;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
ret.push(now.join(' '));
|
|
24
|
+
return ret;
|
|
25
|
+
};
|
|
26
|
+
exports.splitTextIntoTextsOfMinLen = splitTextIntoTextsOfMinLen;
|
|
8
27
|
// ("How are you?",center, 20) => " How are you? "
|
|
9
28
|
// ("How are you?",right, 20) => " How are you?"
|
|
29
|
+
// ("How are you?",center, 4) => "How\nare\nyou?"
|
|
10
30
|
const textWithPadding = (text, alignment, columnLen, charLength) => {
|
|
11
|
-
const curTextSize = (0, console_utils_1.
|
|
31
|
+
const curTextSize = (0, console_utils_1.findWidthInConsole)(text, charLength);
|
|
12
32
|
// alignments for center padding case
|
|
13
33
|
const leftPadding = Math.floor((columnLen - curTextSize) / 2);
|
|
14
34
|
const rightPadding = columnLen - leftPadding - curTextSize;
|
|
15
35
|
// handle edge cases where the text size is larger than the column length
|
|
16
36
|
if (columnLen < curTextSize) {
|
|
17
|
-
|
|
37
|
+
const splittedLines = (0, exports.splitTextIntoTextsOfMinLen)(text, columnLen);
|
|
38
|
+
if (splittedLines.length === 1) {
|
|
39
|
+
return text;
|
|
40
|
+
}
|
|
41
|
+
return splittedLines
|
|
42
|
+
.map((singleLine) => (0, exports.textWithPadding)(singleLine, alignment, columnLen, charLength))
|
|
43
|
+
.join('\n');
|
|
18
44
|
}
|
|
19
45
|
// console.log(text, columnLen, curTextSize);
|
|
20
46
|
switch (alignment) {
|
|
@@ -32,29 +58,7 @@ const textWithPadding = (text, alignment, columnLen, charLength) => {
|
|
|
32
58
|
};
|
|
33
59
|
exports.textWithPadding = textWithPadding;
|
|
34
60
|
// ("How are you?",10) => ["How are ", "you?"]
|
|
35
|
-
const limitWidth = (inpStr, width, charLength) => {
|
|
36
|
-
const ret = [];
|
|
37
|
-
const spaceSeparatedStrings = inpStr.split(' ');
|
|
38
|
-
let now = [];
|
|
39
|
-
let cnt = 0;
|
|
40
|
-
spaceSeparatedStrings.forEach((strWithoutSpace) => {
|
|
41
|
-
const consoleWidth = (0, console_utils_1.default)(strWithoutSpace, charLength);
|
|
42
|
-
if (cnt + consoleWidth <= width) {
|
|
43
|
-
cnt += consoleWidth + 1; // 1 for the space
|
|
44
|
-
now.push(strWithoutSpace);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
ret.push(now.join(' '));
|
|
48
|
-
now = [strWithoutSpace];
|
|
49
|
-
cnt = consoleWidth + 1;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
ret.push(now.join(' '));
|
|
53
|
-
return ret;
|
|
54
|
-
};
|
|
55
|
-
exports.limitWidth = limitWidth;
|
|
56
|
-
// ("How are you?",10) => ["How are ", "you?"]
|
|
57
61
|
const biggestWordInSentence = (inpStr, charLength) => inpStr
|
|
58
62
|
.split(' ')
|
|
59
|
-
.reduce((a, b) => Math.max(a, (0, console_utils_1.
|
|
63
|
+
.reduce((a, b) => Math.max(a, (0, console_utils_1.findWidthInConsole)(b, charLength)), 0);
|
|
60
64
|
exports.biggestWordInSentence = biggestWordInSentence;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getWidthLimitedColumnsArray = exports.createHeaderAsRow = exports.renderTableHorizontalBorders = exports.findLenOfColumn = exports.createRow = exports.createColumFromComputedColumn = exports.createColumFromOnlyName = exports.createTableHorizontalBorders = exports.convertRawRowOptionsToStandard = exports.cellText = void 0;
|
|
7
4
|
const input_converter_1 = require("../internalTable/input-converter");
|
|
8
|
-
const console_utils_1 =
|
|
5
|
+
const console_utils_1 = require("./console-utils");
|
|
9
6
|
const string_utils_1 = require("./string-utils");
|
|
10
7
|
const table_constants_1 = require("./table-constants");
|
|
11
8
|
const max = (a, b) => Math.max(a, b);
|
|
@@ -42,7 +39,10 @@ const createColumFromOnlyName = (name) => ({
|
|
|
42
39
|
title: name,
|
|
43
40
|
});
|
|
44
41
|
exports.createColumFromOnlyName = createColumFromOnlyName;
|
|
45
|
-
const createColumFromComputedColumn = (column) =>
|
|
42
|
+
const createColumFromComputedColumn = (column) => {
|
|
43
|
+
var _a;
|
|
44
|
+
return (Object.assign(Object.assign(Object.assign(Object.assign({ name: column.name, title: (_a = column.title) !== null && _a !== void 0 ? _a : column.name }, (0, input_converter_1.objIfExists)('color', column.color)), (0, input_converter_1.objIfExists)('maxLen', column.maxLen)), (0, input_converter_1.objIfExists)('minLen', column.minLen)), { alignment: column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT }));
|
|
45
|
+
};
|
|
46
46
|
exports.createColumFromComputedColumn = createColumFromComputedColumn;
|
|
47
47
|
const createRow = (color, text, separator) => ({
|
|
48
48
|
color,
|
|
@@ -61,9 +61,9 @@ const findLenOfColumn = (column, rows, charLength) => {
|
|
|
61
61
|
length = rows.reduce((acc, row) => max(acc, (0, string_utils_1.biggestWordInSentence)((0, exports.cellText)(row.text[columnId]), charLength)), length);
|
|
62
62
|
return length;
|
|
63
63
|
}
|
|
64
|
-
length = max(length, (0, console_utils_1.
|
|
64
|
+
length = max(length, (0, console_utils_1.findWidthInConsole)(columnTitle, charLength));
|
|
65
65
|
rows.forEach((row) => {
|
|
66
|
-
length = max(length, (0, console_utils_1.
|
|
66
|
+
length = max(length, (0, console_utils_1.findWidthInConsole)((0, exports.cellText)(row.text[columnId]), charLength));
|
|
67
67
|
});
|
|
68
68
|
return length;
|
|
69
69
|
};
|
|
@@ -86,7 +86,7 @@ exports.createHeaderAsRow = createHeaderAsRow;
|
|
|
86
86
|
const getWidthLimitedColumnsArray = (columns, row, charLength) => {
|
|
87
87
|
const ret = {};
|
|
88
88
|
columns.forEach((column) => {
|
|
89
|
-
ret[column.name] = (0, string_utils_1.
|
|
89
|
+
ret[column.name] = (0, string_utils_1.splitTextIntoTextsOfMinLen)((0, exports.cellText)(row.text[column.name]), column.length || table_constants_1.DEFAULT_COLUMN_LEN, charLength);
|
|
90
90
|
});
|
|
91
91
|
return ret;
|
|
92
92
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "console-table-printer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"repository": "github:ayonious/console-table-printer",
|
|
5
5
|
"description": "Printing pretty tables on console log",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,24 +25,23 @@
|
|
|
25
25
|
"author": "Nahiyan Kamal",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@semantic-release/changelog": "^6.0.
|
|
28
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
29
29
|
"@semantic-release/git": "^10.0.1",
|
|
30
|
-
"@types/jest": "^
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
33
|
-
"
|
|
34
|
-
"eslint": "^8.22.0",
|
|
30
|
+
"@types/jest": "^29.5.11",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
32
|
+
"@typescript-eslint/parser": "^6.15.0",
|
|
33
|
+
"eslint": "^8.56.0",
|
|
35
34
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
36
|
-
"eslint-config-prettier": "^
|
|
37
|
-
"eslint-plugin-import": "^2.
|
|
38
|
-
"eslint-plugin-prettier": "^
|
|
39
|
-
"husky": "^8.0.
|
|
40
|
-
"jest": "^
|
|
41
|
-
"prettier": "^
|
|
35
|
+
"eslint-config-prettier": "^9.1.0",
|
|
36
|
+
"eslint-plugin-import": "^2.29.1",
|
|
37
|
+
"eslint-plugin-prettier": "^5.1.0",
|
|
38
|
+
"husky": "^8.0.3",
|
|
39
|
+
"jest": "^29.7.0",
|
|
40
|
+
"prettier": "^3.1.1",
|
|
42
41
|
"pretty-quick": "^3.1.3",
|
|
43
|
-
"semantic-release": "^
|
|
44
|
-
"ts-jest": "^
|
|
45
|
-
"typescript": "^
|
|
42
|
+
"semantic-release": "^22.0.12",
|
|
43
|
+
"ts-jest": "^29.1.1",
|
|
44
|
+
"typescript": "^5.3.3"
|
|
46
45
|
},
|
|
47
46
|
"homepage": "https://console-table.netlify.app",
|
|
48
47
|
"dependencies": {
|