console-table-printer
Advanced tools
Comparing version 1.1.20 to 1.1.21
@@ -12,3 +12,3 @@ "use strict"; | ||
line.addWithColor(table_constants_1.COLOR.white, " "); | ||
line.addWithColor(row.color, table_helpers_1.textWithPadding(`${row.text[column.name] || ""}`, column.alignment, column.max_ln)); | ||
line.addWithColor(row.color, table_helpers_1.textWithPadding(`${row.text[column.name] || ""}`, column.alignment || table_constants_1.COLUMN_ALIGNMENT.right, column.max_ln || 20)); | ||
line.addWithColor(table_constants_1.COLOR.white, " " + tableStyle.vertical); | ||
@@ -32,3 +32,3 @@ } | ||
// ╔═══════╦═══════════════════════════════════════╦════════╗ | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.headerTop, table.columns.map(m => m.max_ln))); | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.headerTop, table.columns.map(m => (m.max_ln || 20)))); | ||
// ║ index ║ text ║ value ║ | ||
@@ -38,3 +38,3 @@ let row = table_helpers_1.createHeaderAsRow(table_helpers_1.createRow, table.columns); | ||
// ╟═══════╬═══════════════════════════════════════╬════════╢ | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.headerBottom, table.columns.map(m => m.max_ln))); | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.headerBottom, table.columns.map(m => (m.max_ln || 20)))); | ||
return ret; | ||
@@ -45,3 +45,3 @@ } | ||
// ╚═══════╩═══════════════════════════════════════╩════════╝ | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.tableBottom, table.columns.map(m => m.max_ln))); | ||
ret.push(table_helpers_1.printTableHorizontalBorders(table.tableStyle.tableBottom, table.columns.map(m => (m.max_ln || 20)))); | ||
return ret; | ||
@@ -48,0 +48,0 @@ } |
@@ -16,3 +16,2 @@ import { TABLE_BORDER_STYLES, TABLE_STYLE_DETAILS } from "./table-constants"; | ||
style: TABLE_BORDER_STYLES; | ||
styleDetails: TABLE_STYLE_DETAILS; | ||
initSimple(columns: string[]): void; | ||
@@ -19,0 +18,0 @@ initDetailed(options: ComplexOptions): void; |
@@ -12,2 +12,3 @@ "use strict"; | ||
this.tableStyle = table_constants_1.TABLE_STYLE.thinBorder; | ||
this.style = table_constants_1.TABLE_BORDER_STYLES.thinBorder; | ||
if (options instanceof Array) { | ||
@@ -14,0 +15,0 @@ this.initSimple(options); |
@@ -1,8 +0,6 @@ | ||
export interface TABLE_LINE_DETAILS { | ||
left: string; | ||
mid: string; | ||
right: string; | ||
other: string; | ||
} | ||
export interface TABLE_STYLE_DETAILS { | ||
declare type TABLE_LINE_DETAILS_KEYS = 'left' | 'right' | 'mid' | 'other'; | ||
export declare type TABLE_LINE_DETAILS = { | ||
[key in TABLE_LINE_DETAILS_KEYS]: string; | ||
}; | ||
export declare type TABLE_STYLE_DETAILS = { | ||
headerTop: TABLE_LINE_DETAILS; | ||
@@ -12,3 +10,3 @@ headerBottom: TABLE_LINE_DETAILS; | ||
vertical: string; | ||
} | ||
}; | ||
export declare enum TABLE_BORDER_STYLES { | ||
@@ -80,1 +78,2 @@ fatBorder = 0, | ||
} | ||
export {}; |
{ | ||
"name": "console-table-printer", | ||
"version": "1.1.20", | ||
"version": "1.1.21", | ||
"repository": "github:ayonious/console-table-printer", | ||
@@ -5,0 +5,0 @@ "description": "Printing pretty tables on console log", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24186
509