Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function printSubheader(heading) {
if (!__1.Flagpole.quietMode) {
console.log(ansiAlign.center("\x1b[31m===========================================================================\n" +
"\x1b[0m" + heading + "\n" +
"\x1b[31m===========================================================================\x1b[0m\n"));
}
}
exports.printSubheader = printSubheader;
export function printSubheader(heading: string) {
if (!FlagpoleExecution.opts.quietMode) {
console.log(
ansiAlign.center(
"\x1b[31m===========================================================================\x1b[0m\n" +
"\x1b[0m" +
heading +
"\n" +
"\x1b[31m===========================================================================\x1b[0m\n"
)
);
}
}
export function centreText(text: string, width: number): string {
const wrappedLine: string = ansiAlign.center(wrapAnsi(text, width) + "\n" + " ".repeat(width));
return wrappedLine.substring(0, wrappedLine.lastIndexOf("\n"));
}