JSPM

  • Created
  • Published
  • Downloads 21034634
  • Score
    100M100P100Q227163F

Formats data into a string table.

Package Exports

  • table
  • table/dist/table

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (table) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Table

NPM version js-canonical-style

(This library is work in progress. The working library will be released in 2.0.0.)

Formats data into a string table.

  • Works with strings containing fullwidth characters.
  • Works with strings containing ANSI escape codes.
  • Supports minWidth, maxWidth properties per column.
  • Supports expanding long cell values into multiple rows.

Usage

Basic Table

Table data is described using an array of arrays.

let table = require('table'),
    data;

data = [
    ['0A', '0B', '0C'],
    ['1A', '1B', '1C'],
    ['2A', '2B', '2C']
];

console.log(table(data));