Comparing version 1.1.0 to 1.1.1
36
app.js
@@ -63,2 +63,20 @@ // Import. | ||
/** | ||
* Magenta. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static magenta(text = '') { | ||
return setColor(text, colors.foreground.magenta); | ||
} | ||
/** | ||
* Cyan. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static cyan(text = '') { | ||
return setColor(text, colors.foreground.cyan); | ||
} | ||
/** | ||
* Black background. | ||
@@ -116,2 +134,20 @@ * @param {string} text - Text. | ||
} | ||
/** | ||
* Magenta background. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static magentaBackground(text = '') { | ||
return setColor(text, colors.background.magenta); | ||
} | ||
/** | ||
* Cyan background. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static cyanBackground(text = '') { | ||
return setColor(text, colors.background.cyan); | ||
} | ||
} | ||
@@ -118,0 +154,0 @@ |
@@ -12,3 +12,5 @@ /** | ||
yellow: '\x1b[33m', | ||
red: '\x1b[31m' | ||
red: '\x1b[31m', | ||
magenta: '\x1b[35m', | ||
cyan: '\x1b[36m' | ||
}, | ||
@@ -21,4 +23,6 @@ background: { | ||
yellow: '\x1b[43m', | ||
red: '\x1b[41m' | ||
red: '\x1b[41m', | ||
magenta: '\x1b[45m', | ||
cyan: '\x1b[46m' | ||
} | ||
}; |
{ | ||
"name": "ccolor", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Console color", | ||
@@ -5,0 +5,0 @@ "main": "app.js", |
@@ -30,2 +30,4 @@ # CColor | ||
console.log(CColor.red('Red foreground.')); | ||
console.log(CColor.magenta('Magenta foreground.')); | ||
console.log(CColor.cyan('Cyan foreground.')); | ||
@@ -39,2 +41,4 @@ // Colored backgrounds. | ||
console.log(CColor.redBackground('Red background.')); | ||
console.log(CColor.magentaBackground('Magenta background.')); | ||
console.log(CColor.cyanBackground('Cyan background.')); | ||
@@ -41,0 +45,0 @@ // Colored foreground and backgrounds at the same time. |
@@ -13,2 +13,4 @@ // Import. | ||
console.log(CColor.red('Red foreground.')); | ||
console.log(CColor.magenta('Magenta foreground.')); | ||
console.log(CColor.cyan('Cyan foreground.')); | ||
@@ -24,2 +26,4 @@ // Test backgrounds. | ||
console.log(CColor.redBackground('Red background.')); | ||
console.log(CColor.magentaBackground('Magenta background.')); | ||
console.log(CColor.cyanBackground('Cyan background.')); | ||
@@ -26,0 +30,0 @@ // Test mixed. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8198
199
58