Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svkhrobbeck/pretty-table
https://github.com/svkhrobbeck/pretty-table
classes npm-package typescript
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/svkhrobbeck/pretty-table
- Owner: svkhrobbeck
- Created: 2024-09-14T10:08:36.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-14T10:25:03.000Z (2 months ago)
- Last Synced: 2024-09-28T15:21:10.060Z (about 2 months ago)
- Topics: classes, npm-package, typescript
- Language: TypeScript
- Homepage:
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 ║
╚═════════════════╩═════╝
```