Customize table characters and styles
masterYou can control the visual appearance of the table using the chars and style options in the constructor.
chars: An object defining the characters used for borders (e.g.,top,bottom,left,mid, etc.). Setting these to empty strings can remove specific border lines.style: An object used to set padding or specific styles for parts of the table likeheadorborder.
var Table = require('cli-table3');
// Custom border characters
var table = new Table({
chars: {
'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗',
'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝',
'left': '║' , 'left-mid': '╟' , 'mid': '─' , 'mid-mid': '┼',
'right': '║' , 'right-mid': '╢' , 'middle': '│'
}
});
table.push(['foo', 'bar', 'baz']);
console.log(table.toString());