import { Table } from "https://deno.land/x/cliffy@v1.0.0-rc.7/table/mod.ts";
Table representation.
import { Row, Table } from "./mod.ts";
new Table()
.header(new Row("Name", "Date", "City", "Country").border())
.body([
["Baxter Herman", "Oct 1, 2020", "Harderwijk", "Slovenia"],
["Jescie Wolfe", "Dec 4, 2020", "Alto Hospicio", "Japan"],
["Allegra Cleveland", "Apr 16, 2020", "Avernas-le-Bauduin", "Samoa"],
["Aretha Gamble", "Feb 22, 2021", "Honolulu", "Georgia"],
])
.render();
Properties
Methods
Enable/disable cell border.
Set border characters.
Set column options by index.
Set column options.
Read data from an array of json objects. An object represents a row and each property a column.
Check if table has border.
Get columns.
Get table indentation.
Get max column width.
Get min column width.
Get cell padding.
Check if table bordy has border.
Check if table header or body has border.
Check if header row has border.
Set table indentation.
Set max column width.
Set min column width.
Set cell padding.
Write table to stdout.
Generate table string.
Static Properties
Static Methods
Set global default border characters.
Create a new table. If rows is a table, all rows and options of the table will be copied to the new table.
Create a new table from an array of json objects. An object represents a row and each property a column.