aboutsummaryrefslogtreecommitdiff
path: root/src/lib/utils
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-05-29 00:14:24 +0000
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-05-29 00:14:24 +0000
commitfbce619ff39521bdd30ab6598c83d0c94e5ae6b8 (patch)
treec5fca75a82aab768b9595dd39f1cabdfabea0664 /src/lib/utils
parent25cf269e2e793de5fefb9aa3f19fb167168e06c6 (diff)
downloadtanzanite-fbce619ff39521bdd30ab6598c83d0c94e5ae6b8.tar.gz
tanzanite-fbce619ff39521bdd30ab6598c83d0c94e5ae6b8.tar.bz2
tanzanite-fbce619ff39521bdd30ab6598c83d0c94e5ae6b8.zip
Automatically format code
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/Console.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/utils/Console.ts b/src/lib/utils/Console.ts
index 36c078c..5b61094 100644
--- a/src/lib/utils/Console.ts
+++ b/src/lib/utils/Console.ts
@@ -7,7 +7,7 @@ export class CustomConsole {
this.client = client;
}
- private parseColors(content: any, color: 'blueBright' | 'blackBright' | 'redBright' | 'yellowBright' | 'greenBright'): string|any {
+ private parseColors(content: any, color: 'blueBright' | 'blackBright' | 'redBright' | 'yellowBright' | 'greenBright'): string | any {
if (typeof content === 'string') {
const newContent: Array<string> = content.split(/<<|>>/);
const tempParsedArray: Array<string> = [];
@@ -20,9 +20,8 @@ export class CustomConsole {
});
return tempParsedArray.join('');
} else {
- return content
+ return content;
}
-
}
private timeStamp(): string {
@@ -53,7 +52,7 @@ export class CustomConsole {
* @param content - The content to log, highlights displayed in bright black.
*/
public verbose(header: string, content: string): void {
- return console.info(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey(`[${header}]`)} `+this.parseColors(content, 'blackBright'));
+ return console.info(`${chalk.bgGrey(this.timeStamp())} ${chalk.grey(`[${header}]`)} ` + this.parseColors(content, 'blackBright'));
}
/**
@@ -62,7 +61,7 @@ export class CustomConsole {
* @param content - The content to log, highlights displayed in bright blue.
*/
public info(header: string, content: string): void {
- return console.info(`${chalk.bgCyan(this.timeStamp())} ${chalk.cyan(`[${header}]`)} `+this.parseColors(content, 'blueBright'));
+ return console.info(`${chalk.bgCyan(this.timeStamp())} ${chalk.cyan(`[${header}]`)} ` + this.parseColors(content, 'blueBright'));
}
/**
@@ -71,7 +70,7 @@ export class CustomConsole {
* @param content - The content to log, highlights displayed in bright yellow.
*/
public warn(header: string, content: string): void {
- return console.warn(`${chalk.bgYellow(this.timeStamp())} ${chalk.yellow(`[${header}]`)} `+this.parseColors(content, 'yellowBright'));
+ return console.warn(`${chalk.bgYellow(this.timeStamp())} ${chalk.yellow(`[${header}]`)} ` + this.parseColors(content, 'yellowBright'));
}
/**
@@ -80,7 +79,7 @@ export class CustomConsole {
* @param content - The content to log, highlights displayed in bright red.
*/
public error(header: string, content: string): void {
- return console.error(`${chalk.bgRedBright(this.timeStamp())} ${chalk.redBright(`[${header}]`)} `+ this.parseColors(content, 'redBright'));
+ return console.error(`${chalk.bgRedBright(this.timeStamp())} ${chalk.redBright(`[${header}]`)} ` + this.parseColors(content, 'redBright'));
}
/**
@@ -89,6 +88,6 @@ export class CustomConsole {
* @param content - The content to log, highlights displayed in bright green.
*/
public success(header: string, content: string): void {
- return console.log(`${chalk.bgGreen(this.timeStamp())} ${chalk.greenBright(`[${header}]`)} `+this.parseColors(content, 'greenBright'));
+ return console.log(`${chalk.bgGreen(this.timeStamp())} ${chalk.greenBright(`[${header}]`)} ` + this.parseColors(content, 'greenBright'));
}
}