@types/text-table

  • Version 0.2.5
  • Published
  • 4.1 kB
  • No dependencies
  • MIT license

Install

npm i @types/text-table
yarn add @types/text-table
pnpm add @types/text-table

Overview

TypeScript definitions for text-table

Index

Functions

function table

table: (rows: Array<Array<{}>>, options?: table.Options) => string;
  • Generates borderless text table strings suitable for printing to stdout.

Interfaces

interface Options

interface Options {}

    property align

    align?: Array<'l' | 'r' | 'c' | '.' | null | undefined> | undefined;
    • An array of alignment types for each column, default ['l','l',...].

    property hsep

    hsep?: string | undefined;
    • Separator to use between columns, (default: ' ').

    method stringLength

    stringLength: (str: string) => number;
    • A callback function to use when calculating the string length.

    Package Files (1)

    Dependencies (0)

    No dependencies.

    Dev Dependencies (0)

    No dev dependencies.

    Peer Dependencies (0)

    No peer dependencies.

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/text-table.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/text-table)
    • HTML
      <a href="https://www.jsdocs.io/package/@types/text-table"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>