Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
809fd3afed
commit
a2cdde86a4
14
js/doc/cli-table-demo.js
Normal file
14
js/doc/cli-table-demo.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
var Table = require('./cli-table');
|
||||||
|
|
||||||
|
// instantiate
|
||||||
|
var table = new Table({
|
||||||
|
head: ['TH 1 label', 'TH 2 label']
|
||||||
|
, colWidths: [20, 20]
|
||||||
|
});
|
||||||
|
|
||||||
|
// table is an Array, so you can `push`, `unshift`, `splice` and friends
|
||||||
|
table.push(
|
||||||
|
['First value', 'Second value with overlength']
|
||||||
|
, ['First value', 'Second value']
|
||||||
|
);
|
||||||
|
console.log(table.toString());
|
Loading…
Reference in New Issue
Block a user