Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/svkhrobbeck/pretty-table


https://github.com/svkhrobbeck/pretty-table

classes npm-package typescript

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# pretty-table

A nice little npm package that can print table to the console

## Installation

`npm i @yasudoro/pretty-table`
or
`yarn add @yasudoro/pretty-table`

## Usage

```javascript
const PrettyTable = require("pretty-table");

const table = new PrettyTable([
{
name: "Kurosaki Ichigo",
age: 17
},
{
name: "Sosuke Aizen",
age: 34
}
]);

table.print();

//Outputs the following to CLI:

╔═════════════════╦═════╗
║name ║ age ║
╠═════════════════╬═════╣
║Kurosaki Ichigo ║ 17 ║
║Sosuke Aizen ║ 34 ║
╚═════════════════╩═════╝
```