Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/table/mod.ts>Row

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class Row
extends Array<T>
import { Row } from "https://deno.land/x/cliffy@v1.0.0-rc.1/table/mod.ts";

Row representation.

Can be used to customize a single row.

import { Row, Table } from "./mod.ts";

new Table()
  .body([
    new Row("Foo", "Bar").align("right"),
    ["Beep", "Boop"],
  ])
  .render();

Type Parameters

optional
T extends CellType | undefined = CellType | undefined

Properties

protected
options: RowOptions

Methods

align(direction: Direction, override?): this

Align row content.

border(enable?, override?): this

Enable/disable cell border.

Clone row recursively with all options.

Get row alignment.

getBorder(): boolean

Check if row has border.

hasBorder(): boolean

Check if row or any child cell has border.

Static Methods

from<T extends CellType | undefined>(cells: RowType<T>): Row<T>

Create a new row. If cells is a row, all cells and options of the row will be copied to the new row.