Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
rkvcs/tybleHelper to create table on terminal.
Tyble
Helper to create table on terminal.
Example to create a table:
import { Column, Row, Table, TableStyle, TextAlign, TextStyle } from "@rkvcs/tyble"; import { Chalk } from "npm:chalk"; // Using chalk to format the columns. const chalk = new Chalk(); const header = new Row(new Column("Col1"), new Column("Col2")) const footer = new Row(new Column(""), new Column( "TOTAL: 123", new TextStyle(chalk.blue).add(chalk.bold) )) header.setAlign(TextAlign.CENTER) footer.setAlign(TextAlign.RIGHT) const table = new Table({ columns: 2, width: 15, tableStyle: TableStyle.DEFAULT }) table.addHeader(header) table.addFooter(footer) table.add( new Row(new Column("Line 1"), new Column("Col 2")) ) table.add( new Row(new Column("Line 2"), new Column("Col 2")) ) table.add( new Row(new Column("Line 3"), new Column("Col 2")) ) console.info(table.render())
Table's styles:

Built and signed on
GitHub Actions
Add Package
deno add jsr:@rkvcs/tyble
Import symbol
import * as tyble from "@rkvcs/tyble";
Import directly with a jsr specifier
import * as tyble from "jsr:@rkvcs/tyble";
Add Package
bunx jsr add @rkvcs/tyble
Import symbol
import * as tyble from "@rkvcs/tyble";