import { Table } from "https://deno.land/x/wmill@v1.364.2/deps.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();
Methods
Align table content.
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.
Get table alignment.
Check if table has border.
Get column by column index.
Get columns.
Get table header.
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 header.
Set table indentation.
Set max column width.
Set min column width.
Set cell padding.
Write table to stdout.
Generate table string.
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.