Class EasyTable

Index

Interfaces

Constructor methods

Methods

Functions

Interfaces

Accumulator: Accumulator

Creates a new function.

(sum: number, val: number, index: number, length: number): number

Parameters

  • sum: number
  • val: number
  • index: number
  • length: number

Returns

number

public arguments: any

public caller: Function

public length: number

public prototype: any

public apply(thisArg: any, argArray?: any): any

Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.

Parameters

  • thisArg: any

    The object to be used as the this object.

  • argArray?: any optional

    A set of arguments to be passed to the function.

Returns

any

public bind(thisArg: any, argArray?: Array<any>): any

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters

  • thisArg: any

    An object to which the this keyword can refer inside the new function.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the new function.

Returns

any

public call(thisArg: any, argArray?: Array<any>): any

Calls a method of an object, substituting another object for the current object.

Parameters

  • thisArg: any

    The object to be used as the current object.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the method.

Returns

any

CellPrinter: CellPrinter

Creates a new function.

(obj: any, cell: (label: string, value: any, width?: number) => void): string

Parameters

  • obj: any
  • cell: (label: string, value: any, width?: number) => void

Returns

string

public arguments: any

public caller: Function

public length: number

public prototype: any

public apply(thisArg: any, argArray?: any): any

Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.

Parameters

  • thisArg: any

    The object to be used as the this object.

  • argArray?: any optional

    A set of arguments to be passed to the function.

Returns

any

public bind(thisArg: any, argArray?: Array<any>): any

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters

  • thisArg: any

    An object to which the this keyword can refer inside the new function.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the new function.

Returns

any

public call(thisArg: any, argArray?: Array<any>): any

Calls a method of an object, substituting another object for the current object.

Parameters

  • thisArg: any

    The object to be used as the current object.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the method.

Returns

any

Printer: Printer

Creates a new function.

(table: EasyTable): string

Parameters

Returns

string

public arguments: any

public caller: Function

public length: number

public prototype: any

public apply(thisArg: any, argArray?: any): any

Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.

Parameters

  • thisArg: any

    The object to be used as the this object.

  • argArray?: any optional

    A set of arguments to be passed to the function.

Returns

any

public bind(thisArg: any, argArray?: Array<any>): any

For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.

Parameters

  • thisArg: any

    An object to which the this keyword can refer inside the new function.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the new function.

Returns

any

public call(thisArg: any, argArray?: Array<any>): any

Calls a method of an object, substituting another object for the current object.

Parameters

  • thisArg: any

    The object to be used as the current object.

  • argArray?: Array<any> optional

    A list of arguments to be passed to the method.

Returns

any

Constructor methods

constructor(): EasyTable

Returns

EasyTable

Methods

public cell(label: string, value: any, printer?: CellPrinter, width?: number)

Parameters

  • label: string
  • value: any
  • printer?: CellPrinter optional
  • width?: number optional

public newRow()

public print(): string

Returns

string

public printTransposed(): string

Returns

string

public sort(fields: string)

Parameters

  • fields: string

public sort(comparer: (a: any, b: any) => number)

Parameters

  • comparer: (a: any, b: any) => number

public toString(): string

Returns

string

public total(label: string, accumulator: Accumulator, totalPrinter: CellPrinter)

Parameters

Functions

LeftPadder(char: string): CellPrinter

Parameters

  • char: string

Returns

CellPrinter

Number(length: number): CellPrinter

Parameters

  • length: number

Returns

CellPrinter

RightPadder(char: string): CellPrinter

Parameters

  • char: string

Returns

CellPrinter

printArray(array: Array<any>, cellPrinter?: CellPrinter, tablePrinter?: Printer): string

Parameters

Returns

string

printObject(object: any, cellPrinter?: CellPrinter, tablePrinter?: Printer): string

Parameters

Returns

string