Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 19, 2024 via pnpm

cli-table3 0.6.3

Pretty unicode tables for the command line. Based on the original cli-table.
Package summary
Share
0
issues
1
license
7
MIT
Package created
10 Jun 2018
Version published
15 Sep 2022
Maintainers
2
Total deps
7
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
@colors/colors@1.5.0
ansi-regex@5.0.1
cli-table3@0.6.3
emoji-regex@8.0.0
is-fullwidth-code-point@3.0.0
string-width@4.2.3
strip-ansi@6.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of cli-table3 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@colors/colors1.5.010.89 kBMIT
prod optional
string-width4.2.32.33 kBMIT
prod

Visualizations

Frequently Asked Questions

What does cli-table3 do?

cli-table3 is a utility that allows for the rendering of unicode-aided tables in the command line from your node.js scripts. It's a refreshed version based on the original cli-table and cli-table2, which are no longer maintained. The added value of cli-table3 over its predecessors is the ability to make cells span multiple columns and/or rows, set custom styles per cell, better align text vertically and horizontally, and handle text color that spans multiple lines more efficiently. It also has various other features like improved truncation for cell text that contains ansi color characters, is API compatible with the original cli-table and comes with a highly comprehensive test suite including the entire original suite for cli-table.

How do you use cli-table3?

To use cli-table3, start by installing it on your system with the npm package manager, using the command npm install cli-table3.

The usage breaks down into three primary types of tables you can create: horizontal, vertical, and cross tables. For all types, you start by requiring 'cli-table3' in your node.js scripts.

For a horizontal table, you instantiate a new Table object with desired properties, like header labels and column widths. The table is essentially an array and can be manipulated as such with push, unshift, splice and other array methods to add rows.

Vertical tables follow a similar process, but the table object is declared without properties and rows are added again using the push method, with key-value pairs representing a single cell.

Cross tables require an empty string as the first header in the head property. The rows here are structured with a key being the row header and the value being an array of cell values.

You can also customize table styles using the chars property or create compact tables with no decoration.

For more details and advanced usage examples, refer to the examples provided in the unit test suite.

Where are the cli-table3 docs?

The official documentation for cli-table3 can be found directly in the readme file of its repository on GitHub. Additionally, cli-table3 provides a basic usage guide and an advanced usage guide, both hosted on GitHub. These guides cover basic usage cases and make good use of the new column and row span features, respectively.