Comparing version 1.1.1 to 1.2.1
36
app.js
@@ -151,2 +151,38 @@ // Import. | ||
} | ||
/** | ||
* Bright style. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static brightStyle(text = '') { | ||
return setColor(text, colors.style.bright); | ||
} | ||
/** | ||
* Dim style. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static dimStyle(text = '') { | ||
return setColor(text, colors.style.dim); | ||
} | ||
/** | ||
* Underscore style. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static underscoreStyle(text = '') { | ||
return setColor(text, colors.style.underscore); | ||
} | ||
/** | ||
* Blink style. | ||
* @param {string} text - Text. | ||
* @return {string} | ||
*/ | ||
static blinkStyle(text = '') { | ||
return setColor(text, colors.style.blink); | ||
} | ||
} | ||
@@ -153,0 +189,0 @@ |
@@ -25,3 +25,9 @@ /** | ||
cyan: '\x1b[46m' | ||
}, | ||
style: { | ||
bright: '\x1b[1m', | ||
dim: '\x1b[2m', | ||
underscore: '\x1b[4m', | ||
blink: '\x1b[5m' | ||
} | ||
}; |
{ | ||
"name": "ccolor", | ||
"version": "1.1.1", | ||
"version": "1.2.1", | ||
"description": "Console color", | ||
@@ -5,0 +5,0 @@ "main": "app.js", |
@@ -43,2 +43,8 @@ # CColor | ||
// Styles. | ||
console.log(CColor.brightStyle('Bright style.')); | ||
console.log(CColor.dimStyle('Dim style.')); | ||
console.log(CColor.underscoreStyle('Underscore style.')); | ||
console.log(CColor.blinkStyle('Blink style.')); | ||
// Colored foreground and backgrounds at the same time. | ||
@@ -45,0 +51,0 @@ console.log(CColor.yellowBackground(CColor.red('Red foreground with yellow background.'))); |
@@ -28,2 +28,10 @@ // Import. | ||
// Test styles. | ||
console.log('\nStyles:'); | ||
console.log('--------------'); | ||
console.log(CColor.brightStyle('Bright style.')); | ||
console.log(CColor.dimStyle('Dim style.')); | ||
console.log(CColor.underscoreStyle('Underscore style.')); | ||
console.log(CColor.blinkStyle('Blink style.')); | ||
// Test mixed. | ||
@@ -30,0 +38,0 @@ console.log('\nMixed:'); |
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
9487
244
64