mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 15:56:24 +02:00
18 lines
495 B
JavaScript
18 lines
495 B
JavaScript
const chalk = require('chalk');
|
|
const columnify = require('columnify');
|
|
|
|
module.exports = (data) => columnify(data, {
|
|
columnSplitter: ' | ',
|
|
minWidth: 10,
|
|
headingTransform(title) {
|
|
switch (title) {
|
|
case 'statuses':
|
|
return chalk.yellow.underline.bold(`*${title.toUpperCase()}*`);
|
|
case 'method':
|
|
return chalk.green.underline.bold(`*${title.toUpperCase()}*`);
|
|
default:
|
|
return chalk.cyan.underline.bold(`*${title.toUpperCase()}*`);
|
|
}
|
|
},
|
|
});
|