SPECIAL! Pre-Order my book Smashing Node.JS on Amazon today!
Show Posts
← Back to homepage

Just released a small Node.JS module to create cool terminal tables.

var Table = require('cli-table');

// instantiate
var table = new Table({
    head: ['TH 1 label', 'TH 2 label']
  , colWidths: [100, 200]
});

// Table inherits from Array
table.push(
    ['First value', 'Second value']
  , ['First value', 'Second value']
);

// render
console.log(table.toString());

One Comment

Rogie King said

Um, like rad.

Your thoughts?

About Guillermo Rauch:

CTO and co-founder of LearnBoost, developer, open source enthusiast, blogger.