11 lines
410 B
TypeScript
11 lines
410 B
TypeScript
import chalk from 'chalk';
|
|
import stripAnsi from 'strip-ansi';
|
|
|
|
const cols = 80;
|
|
const rightHeader = `repo: ${chalk.bold.cyan(`builderadmin/PublicProject`)} `;
|
|
const rightLen = stripAnsi(rightHeader).length;
|
|
const leftHeader = ` Forgejo Issue Explorer`;
|
|
const leftLen = stripAnsi(leftHeader).length;
|
|
let spacesCount = cols - leftLen - rightLen;
|
|
console.log(leftHeader + ' '.repeat(spacesCount) + rightHeader);
|