Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas authored and actions-user committed Dec 18, 2023
1 parent afbda49 commit 7420c27
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/helpers/src/utils/logInfo.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
const ColorReset = '\x1b[0m';
type TextColor =
| 'Red'
| 'Green'
| 'Black'
| 'Yellow'
| 'Blue'
| 'Magenta'
| 'Cyan'
| 'White';
type TextColor = 'Red' | 'Green' | 'Black' | 'Yellow' | 'Blue' | 'Magenta' | 'Cyan' | 'White';

const textColor = {
Red: '\x1b[31m',
Expand All @@ -21,6 +13,5 @@ const textColor = {
} satisfies Record<TextColor, string>;

export function logInfo(message: string, color: TextColor): void {
console.log(`${textColor[color]}${message}${ColorReset}`);
}

console.log(`${textColor[color]}${message}${ColorReset}`);
}

0 comments on commit 7420c27

Please sign in to comment.