ut-function.console-table
v1.1.1
Published
Auto-fit console.table
Downloads
71
Readme
ut-function.console-table
Auto-fit console.table
Usage
ut-function.console-table
uses console.table
to show an array
as a table in the console. It will try to shrink or hide columns,
so that the output fits to the specified width.
const table = require('ut-function.console-table');
table(params, options)
param
can be:- an
array
- an
object
with properties {rows
,name
}, wherename
will be shown in the console above the table specified withrows
- an
options
is an optional parameter with properties:maxWidth
- the maximum table widthmaxColWidth
- the maximum column width