mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 07:03:08 -04:00
exports
This commit is contained in:
parent
e2146f5716
commit
6484c69851
4 changed files with 8 additions and 27 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue