使用 Node.js 为 CLI 提供漂亮的 Unicode 表格
此实用程序允许您在命令行上从 Node.js 脚本中渲染带有 Unicode 支持的表格。
交叉表与垂直表非常相似,但有两个主要区别:
head,其中第一个标题为空字符串var Table = require('cli-table');
var table = new Table({ head: ["", "Top Header 1", "Top Header 2"] });
table.push(
{ 'Left Header 1': ['Value Row 1 Col 1', 'Value Row 1 Col 2'] }
, { 'Left Header 2': ['Value Row 2 Col 1', 'Value Row 2 Col 2'] }
);
console.log(table.toString());colors.js ['First value', 'Second value'] ['foo', '7 minutes ago']
暂无开放 Issues,或尚未同步最近议题。