Changed small functions to methods
Added custom color function
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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, "")
|
||||
}
|
||||
Reference in New Issue
Block a user