[UNMAINTAINED] Yet Another Table Formatter
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-12-02 23:21:23 +01:00
lib Update lib/yatf.js 2013-01-03 22:19:26 -08:00
.gitignore Initial 2012-06-21 18:23:01 +02:00
.npmignore Add screenshot file. 2012-06-22 12:10:57 +02:00
example.js Update example and readme. 2012-06-22 12:13:10 +02:00
LICENSE Relicense as MIT 2012-08-11 12:04:52 +02:00
package.json 1.0.4 2013-01-05 21:50:57 +01:00
README.md This project is unmaintained 2016-12-02 23:21:23 +01:00
screenshot.png Update screenshot. 2012-06-22 15:38:39 +02:00

This project is not actively maintained

Issues and pull requests on this repository may not be acted on in a timely manner, or at all. You are of course welcome to use it anyway. You are even more welcome to fork it and maintain the results.

Unmaintained

yatf

Yet Another Table Formatter, obviously. The point of this one is to handle column layout and fit into the current window size. It leaves the formatting completely up to you, except for the underlineHeaders option which you can't do anyway until you know how wide the columns become.

If the window isn't wide enough to display all columns, they'll be truncated and markers indicating this will be shown.

Example

var table = require('yatf');

var headers = [ 'NAME', 'PROPERTY', 'VALUE', 'SOURCE' ];

var data = [
[ 'zones'.bold, 'compressratio', '1.06x', '-' ],
[ 'zones/01b2c898-945f-11e1-a523-af1afbe22822'.blue.bold, 'compressratio', '1.93x'.magenta, '-' ],
// ...
[ 'zones/b2535e73-0892-4183-9e02-0255c6dde661/data'.magenta.bold, 'compressratio', '1.34x'.magenta, '-' ],
];

table(headers, data, { underlineHeaders: true });

License

MIT