mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
22 lines
413 B
TypeScript
22 lines
413 B
TypeScript
import { Table } from 'console-table-printer'
|
|
import { ComplexOptions } from 'console-table-printer/dist/src/models/external-table'
|
|
|
|
export class CliTable {
|
|
table: Table
|
|
|
|
constructor(options?: ComplexOptions | string[]) {
|
|
this.table = new Table(options)
|
|
}
|
|
|
|
append(row) {
|
|
this.table.addRow(row)
|
|
}
|
|
|
|
render() {
|
|
this.table.printTable()
|
|
}
|
|
|
|
toString() {
|
|
return this.table.render()
|
|
}
|
|
}
|