Socket
Socket
Sign inDemoInstall

table-style

Package Overview
Dependencies
3
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    table-style

CLI table output formatter


Version published
Weekly downloads
1.1K
decreased by-43.41%
Maintainers
1
Install size
1.03 MB
Created
Weekly downloads
 

Readme

Source

table-style

CLI Table formatter for NodeJS

Installing

For the latest stable version:

npm install table-style

Usage

import { Table } from "table-style";

interface User {
    name: string;
    role: string;
    office: string;
}

const table = new Table<User>({
    border: "single",
    groups: [
        { by: user => user.role }
    ],
    columns: [
        { header: "name", expression: x => x.name },
        { header: "office", expression: x => x.office, align: "right" }
    ],
    rowStyles: [
        { section: "header", border: { bottom: "double" }, foregroundColor: "white" },
        { section: "body", border: { top: "none", bottom: "none" } }
    ]
});

table.render(users, process.out);

API

FAQs

Last updated on 30 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc