PK
qhYξΆJίF ίF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
| Dir : /opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules.bundled/cli-table2/ |
| Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 66.29.132.192 |
| Dir : //opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules.bundled/cli-table2/advanced-usage.md |
##### use colSpan to span columns - (colSpan above normal cell)
βββββββββββββββββ
β greetings β
βββββββββββββββββ€
β greetings β
βββββββββ¬ββββββββ€
β hello β howdy β
βββββββββ΄ββββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{colSpan:2,content:'greetings'}],
[{colSpan:2,content:'greetings'}],
['hello','howdy']
);
```
##### use colSpan to span columns - (colSpan below normal cell)
βββββββββ¬ββββββββ
β hello β howdy β
βββββββββ΄ββββββββ€
β greetings β
βββββββββββββββββ€
β greetings β
βββββββββββββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
['hello','howdy'],
[{colSpan:2,content:'greetings'}],
[{colSpan:2,content:'greetings'}]
);
```
##### use rowSpan to span rows - (rowSpan on the left side)
βββββββββββββ¬ββββββββββββ¬ββββββββ
β greetings β β hello β
β β greetings βββββββββ€
β β β howdy β
βββββββββββββ΄ββββββββββββ΄ββββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'],
['howdy']
);
```
##### use rowSpan to span rows - (rowSpan on the right side)
βββββββββ¬ββββββββββββ¬ββββββββββββ
β hello β greetings β β
βββββββββ€ β β
β howdy β β greetings β
βββββββββ΄ββββββββββββ΄ββββββββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}],
['howdy']
);
```
##### mix rowSpan and colSpan together for complex table layouts
βββββββββ¬ββββββ¬βββββ
β hello β sup β hi β
βββββββββ€ β β
β howdy β β β
βββββ¬ββββΌβββ¬βββ€ β
β o β k β β β β
βββββ΄ββββ΄βββ΄βββ΄βββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}],
[{content:'howdy',colSpan:2}],
['o','k','','']
);
```
##### multi-line content will flow across rows in rowSpan cells
βββββββββ¬ββββββββββββ¬ββββββββββββ
β hello β greetings β greetings β
βββββββββ€ friends β friends β
β howdy β β β
βββββββββ΄ββββββββββββ΄ββββββββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}],
['howdy']
);
```
##### multi-line content will flow across rows in rowSpan cells - (complex layout)
βββββββββ¬ββββββ¬βββββ
β hello β sup β hi β
βββββββββ€ man β yo β
β howdy β hey β β
βββββ¬ββββΌβββ¬βββ€ β
β o β k β β β β
βββββ΄ββββ΄βββ΄βββ΄βββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}],
[{content:'howdy',colSpan:2}],
['o','k','','']
);
```
##### rowSpan cells can have a staggered layout
βββββ¬ββββ
β a β b β
β βββββ€
β β c β
βββββ€ β
β d β β
βββββ΄ββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{content:'a',rowSpan:2},'b'],
[{content:'c',rowSpan:2}],
['d']
);
```
##### the layout manager automatically create empty cells to fill in the table
βββββ¬ββββ¬βββ
β a β b β β
β βββββ€ β
β β β β
β βββββ΄βββ€
β β c β
βββββ€ β
β β β
βββββ΄βββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
//notice we only create 3 cells here, but the table ends up having 6.
table.push(
[{content:'a',rowSpan:3,colSpan:2},'b'],
[],
[{content:'c',rowSpan:2,colSpan:2}],
[]
);
```
##### use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.
βββββββββ
β hello β
β hiβ¦ β
βββββββββ
```javascript
var table = new Table({rowHeights:[2],style:{head:[],border:[]}});
table.push(['hello\nhi\nsup']);
```
##### if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content
βββββββββββββββ
β hello there β
ββββββββ¬βββββββ€
β hi β hi β
ββββββββ΄βββββββ
```javascript
var table = new Table({style:{head:[],border:[]}});
table.push(
[{colSpan:2,content:'hello there'}],
['hi', 'hi']
);
```
##### you can specify a column width for only the first row, other rows will be automatically widened to fit content
βββββββββββββββ
β hello there β
ββββββ¬βββββββββ€
β hi β hi β
ββββββ΄βββββββββ
```javascript
var table = new Table({colWidths:[4],style:{head:[],border:[]}});
table.push(
[{colSpan:2,content:'hello there'}],
['hi',{hAlign:'center',content:'hi'}]
);
```
##### a column with a null column width will be automatically widened to fit content
βββββββββββββββ
β hello there β
ββββββββββ¬βββββ€
β hi β hi β
ββββββββββ΄βββββ
```javascript
var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}});
table.push(
[{colSpan:2,content:'hello there'}],
[{hAlign:'right',content:'hi'}, 'hi']
);
```
##### feel free to use colors in your content strings, column widths will be calculated correctly

```javascript
var table = new Table({colWidths:[5],style:{head:[],border:[]}});
table.push([colors.red('hello')]);
```