aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ansi-styles/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/ansi-styles/index.js
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/ansi-styles/index.js')
-rw-r--r--node_modules/ansi-styles/index.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js
index 3d3baa66d..90a871c4d 100644
--- a/node_modules/ansi-styles/index.js
+++ b/node_modules/ansi-styles/index.js
@@ -102,30 +102,43 @@ function assembleStyles() {
});
}
+ const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
- styles.color.ansi = {};
- styles.color.ansi256 = {};
+ styles.color.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 0)
+ };
+ styles.color.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 0)
+ };
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
- styles.bgColor.ansi = {};
- styles.bgColor.ansi256 = {};
+ styles.bgColor.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 10)
+ };
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
- for (const key of Object.keys(colorConvert)) {
+ for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== 'object') {
continue;
}
const suite = colorConvert[key];
+ if (key === 'ansi16') {
+ key = 'ansi';
+ }
+
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);