Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelostermann/tables
Highly customizable tables for CLIs and Markdown.
https://github.com/michaelostermann/tables
cli cli-table markdown tables terminal terminal-table tty-table
Last synced: 12 days ago
JSON representation
Highly customizable tables for CLIs and Markdown.
- Host: GitHub
- URL: https://github.com/michaelostermann/tables
- Owner: MichaelOstermann
- License: mit
- Created: 2024-05-18T16:12:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T19:58:30.000Z (6 months ago)
- Last Synced: 2024-10-02T22:46:59.098Z (about 2 months ago)
- Topics: cli, cli-table, markdown, tables, terminal, terminal-table, tty-table
- Language: TypeScript
- Homepage:
- Size: 248 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tables
**Highly customizable tables for CLIs and Markdown.**
![Minified](https://img.shields.io/badge/Minified-25.13_KB-blue)
![Minzipped](https://img.shields.io/badge/Minzipped-9.07_KB-blue)A library for creating complex tables that can handle unicode, alignments, styling, truncation, borders and paddings, primarily for printing to terminals.
It exposes high-level and easy to use functions that come with some defaults, as well as low-level building blocks that you can use to completely customize every single row and column if necessary!
## Examples
CLI
Markdown
## Installation
```sh
npm install @monstermann/tables
yarn add @monstermann/tables
pnpm add @monstermann/tables
```## Getting Started
```ts
import { cli } from '@monstermann/tables'const result = cli.createTable({
columns: ['foo', 'bar'],
rows: [
{ foo: 'Foo', bar: 'Bar' },
],
})console.log(result)
```## Overview
- [CLI](./docs/cli.md#cli)
- [Example](./docs/cli.md#example)
- [Options](./docs/cli.md#options)
- [Alignments](./docs/cli.md#alignments)
- [Styles](./docs/cli.md#styles)
- [Advanced](./docs/cli.md#advanced)
- [`createConfig`](./docs/cli.md#createconfig)
- [`createHeader`](./docs/cli.md#createheader)
- [`createRow`](./docs/cli.md#createrow)
- [`createRowSeparator`](./docs/cli.md#createrowseparator)
- [`createBorderTop`](./docs/cli.md#createbordertop)
- [`createBorderBottom`](./docs/cli.md#createborderbottom)
- [`createBorder`](./docs/cli.md#createborder)
- [`createCell`](./docs/cli.md#createcell)
- [Markdown](./docs/markdown.md#markdown)
- [Example](./docs/markdown.md#example)
- [Options](./docs/markdown.md#options)
- [Core](./docs/core.md#core)
- [`Cell`](./docs/core.md#cell)
- [`renderRows`](./docs/core.md#renderrows)
- [`renderCell`](./docs/core.md#rendercell)
- [`getCellContentWidth`](./docs/core#getcellcontentwidth)
- [`getCellDecorationsWidth`](./docs/core#getcelldecorationswidth)
- [`getCellWidth`](./docs/core.md#getcellwidth)