mirror of https://github.com/iptv-org/iptv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
300 B
TypeScript
22 lines
300 B
TypeScript
4 months ago
|
import { Table } from 'console-table-printer'
|
||
|
|
||
|
export class CliTable {
|
||
|
table: Table
|
||
|
|
||
|
constructor(options?) {
|
||
|
this.table = new Table(options)
|
||
|
}
|
||
|
|
||
|
append(row) {
|
||
|
this.table.addRow(row)
|
||
|
}
|
||
|
|
||
|
render() {
|
||
|
this.table.printTable()
|
||
|
}
|
||
|
|
||
|
toString() {
|
||
|
return this.table.render()
|
||
|
}
|
||
|
}
|