Optional
Readonly
alignment?: stringOptional
Readonly
colors?: boolean | Partial<Readonly<Colors>>Print with ANSI escape sequences for colors.
If not specified it tries to auto-detect via navigator.userAgent.includes("Chrome")
or process.stdout.isTTY
.
Optional
Readonly
columnPrint vertical borders between columns. (default: false
)
If false there will still be a double space between columns, just not the visible border.
Optional
Readonly
formatFormat function to be called on non-string cells.
Per default objects are formatted using JSON.stringify(cell, ..., tabWidth)
,
functions as `[Function: ${name}]`
, dates via cell.toISOString()
,
and everything else just as String(cell)
.
formatted cell
Optional
Readonly
header?: ReadonlyArray<unknown>Array of titles printed in an extra header row.
Optional
Readonly
headerAlignment of header columns. If not specified defaults to same as alignment
.
Optional
Readonly
outline?: booleanPrint outline around the table. (default: true
)
Optional
Readonly
raw?: booleanPrint raw cell values, i.e. don't escape ANSI escape sequences in the provided string cells.
Optional
Readonly
rowPrint horizontal borders between rows. (default: false
)
There is always a border between the header row and the rest. If this option is used that border will be printed as a double-line or fatter, depending on the used style.
Optional
Readonly
Interface
style?: Partial<Readonly<TableStyle>>Override style properties. (default: DefaultTableStyle
)
TableStyle
Optional
Readonly
tabWidth of a tab in string cells or of the indendation used with JSON.stringify()
.
Generated using TypeDoc
Alignment of columns.
Alignments:
>
... left aligned (default unless specified otherwise)<
... right aligned (default forboolean
)-
... centered (default for headers unless specified otherwise).
... right aligned on the.
(default fornumber
,bigint
, andDate
)