Changed small functions to methods

Added custom color function
This commit is contained in:
2024-09-07 20:09:29 +02:00
parent a9fb41cece
commit 7a2a136f30
33 changed files with 74 additions and 76 deletions

View File

@@ -7,10 +7,14 @@ const colors = {
pink: "#f5c2e7"
}
export default function color(text: string, type: keyof typeof colors) {
export function color(text: string, type: keyof typeof colors) {
return chalk.hex(colors[type])(text)
}
export function colorCustom(text: string, color: string) {
return chalk.hex(color)(text)
}
/* const colors = {
reset: "\x1b[0m",
bright: "\x1b[1m",

View File

@@ -1,7 +0,0 @@
export function capitalizeFirstLetter(str: string): string {
return str[0].toUpperCase() + str.slice(1).toLowerCase()
}
export function removeIndents(str: string): string {
return str.replace(/^ */gm, "")
}