Package detail

@svkhrobbeck/pretty-table

svkhrobbeck2981.1.0

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

readme

pretty-table

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

Installation

npm i @svkhrobbeck/pretty-table
or
yarn add @svkhrobbeck/pretty-table

Usage


// Package supports esm and cjs modules
import PrettyTable from "@svkhrobbeck/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  ║
╚═════════════════╩═════╝