@kadena/kadena-cli
Version:
Kadena CLI tool to interact with the Kadena blockchain (manage keys, transactions, etc.)
36 lines • 927 B
JavaScript
import Table from 'cli-table3';
import { log } from './logger.js';
export const TABLE_DEFAULT = {
chars: {
top: '',
'top-mid': '',
'top-left': '',
'top-right': '',
bottom: '',
'bottom-mid': '',
'bottom-left': '',
'bottom-right': '',
left: '',
'left-mid': '',
mid: '',
'mid-mid': '',
right: '',
'right-mid': '',
middle: ' ',
},
style: {
'padding-left': 0,
'padding-right': 0,
head: [],
border: [],
},
};
export const createTable = (options) => {
var _a;
return new Table({
...TABLE_DEFAULT,
// Prefer using our own log colors to maintain full control over enable/disable colors
head: (_a = options.head) === null || _a === void 0 ? void 0 : _a.map((value) => log.color.green(value)),
});
};
//# sourceMappingURL=table.js.map