tabacol

0.3.2 • Public • Published

Tabacol

This project is under heavy development. You should not use it for now as there will be a lot of breaking changes!

Output a table in string format from data in JSON format.

The input data is in 2 parts:

  • The content to display itself, in an array of JSON object. Where each object is a line in the output table.
  • Metadata about the columns to display in the output. An array of JSON object where each object is the configuration for a column.

Possible types of columns

  • fixedAbsolute: width of the column will be a fixed amount of characters
  • fixedPercent: width of the column will be a fixed % of the output width
  • fixedContent: width of the column will be equal to the longest content of the column
  • upToContent: width of the column will be equal to the longest content of the column or truncated if there is not enough space
  • left: width of the column will be computed based on the width left and the longest content of the column

Readme

Keywords

none

Package Sidebar

Install

npm i tabacol

Weekly Downloads

0

Version

0.3.2

License

WTFPL

Last publish

Collaborators

  • cassidy