This commit is contained in:
derpystuff 2022-06-19 14:14:34 +02:00
parent e2146f5716
commit 6484c69851
4 changed files with 8 additions and 27 deletions

View file

@ -22,12 +22,8 @@ const ALIASES = {
"rs": "reset"
}
function format(text, color){
module.exports.format = function(text, color){
if(!ANSI_COLORS[color] && !ALIASES[color]) throw "Invalid ANSI Color"
if(!ANSI_COLORS[color]) color = ALIASES[color]
return `${ANSI_COLORS[color]}${text}${ANSI_COLORS.reset}`
}
module.exports = {
format
}