Options
All
  • Public
  • Public/Protected
  • All
Menu

Module cli/table

Index

Variables

Variables

Const default

default: { _options: { chars?: Partial<Record<CharName, string>>; colAligns?: HorizontalAlignment[]; colWidths?: number[]; head?: string[]; rowAligns?: VerticalAlignment[]; rowHeights?: number[]; style?: Partial<{ border: string[]; compact: boolean; head: string[]; padding-left: number; padding-right: number }>; truncate?: string; wordWrap?: boolean }; _rows: Cell[][]; align: (type: "columns" | "rows", ...columns: (HorizontalAlignment | VerticalAlignment)[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; border: (type: Extract<keyof typeof default, string>) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; colorize: (type: "border" | "head", columns: string[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; compact: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; create: (options?: TableConstructorOptions) => Table; expand: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; head: (...columns: any[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; init: (options?: TableConstructorOptions) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; middleless: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; padding: (left: number, right?: number) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; row: (...columns: Cell[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; rows: (...rows: Cell[][]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; toString: () => string; truncate: (chars?: string) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; uncolorize: (type?: "border" | "head") => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; unwrapped: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; width: (...widths: number[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }; wrapped: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; } } = ...

Type declaration

  • _options: { chars?: Partial<Record<CharName, string>>; colAligns?: HorizontalAlignment[]; colWidths?: number[]; head?: string[]; rowAligns?: VerticalAlignment[]; rowHeights?: number[]; style?: Partial<{ border: string[]; compact: boolean; head: string[]; padding-left: number; padding-right: number }>; truncate?: string; wordWrap?: boolean }
    • Optional chars?: Partial<Record<CharName, string>>
    • Optional colAligns?: HorizontalAlignment[]
    • Optional colWidths?: number[]
    • Optional head?: string[]
    • Optional rowAligns?: VerticalAlignment[]
    • Optional rowHeights?: number[]
    • Optional style?: Partial<{ border: string[]; compact: boolean; head: string[]; padding-left: number; padding-right: number }>
    • Optional truncate?: string
    • Optional wordWrap?: boolean
  • _rows: Cell[][]
  • align: (type: "columns" | "rows", ...columns: (HorizontalAlignment | VerticalAlignment)[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (type: "columns" | "rows", ...columns: (HorizontalAlignment | VerticalAlignment)[]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • type: "columns" | "rows"
        • Rest ...columns: (HorizontalAlignment | VerticalAlignment)[]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • border: (type: Extract<keyof typeof default, string>) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (type: Extract<keyof typeof default, string>): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • type: Extract<keyof typeof default, string>

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • colorize: (type: "border" | "head", columns: string[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (type: "border" | "head", columns: string[]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • type: "border" | "head"
        • columns: string[]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • compact: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • create: (options?: TableConstructorOptions) => Table
      • (options?: TableConstructorOptions): Table
      • Parameters

        • Optional options: TableConstructorOptions

        Returns Table

  • expand: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • head: (...columns: any[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (...columns: any[]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Rest ...columns: any[]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • init: (options?: TableConstructorOptions) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (options?: TableConstructorOptions): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Optional options: TableConstructorOptions

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • middleless: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • padding: (left: number, right?: number) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (left: number, right?: number): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • left: number
        • Optional right: number

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • row: (...columns: Cell[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (...columns: Cell[]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Rest ...columns: Cell[]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • rows: (...rows: Cell[][]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (...rows: Cell[][]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Rest ...rows: Cell[][]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • toString: () => string
      • (): string
      • Returns string

  • truncate: (chars?: string) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (chars?: string): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • chars: string = '...'

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • uncolorize: (type?: "border" | "head") => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (type?: "border" | "head"): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Optional type: "border" | "head"

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • unwrapped: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • width: (...widths: number[]) => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (...widths: number[]): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Parameters

        • Rest ...widths: number[]

        Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

  • wrapped: () => { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • (): { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }
      • Returns { _options: { chars?: Partial<Record<CharName, string>>; style?: Partial<{ "padding-left": number; "padding-right": number; head: string[]; border: string[]; compact: boolean; }>; ... 6 more ...; wordWrap?: boolean; }; ... 18 more ...; toString: () => string; }

Generated using TypeDoc