| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,16 +24,27 @@ module.exports = { | |||
| 24 | 24 | stream.getColorDepth() > 2 : true); | |
| 25 | 25 | }, | |
| 26 | 26 | refresh() { | |
| 27 | - const hasColors = module.exports.shouldColorize(process.stderr); | ||
| 28 | - module.exports.blue = hasColors ? '\u001b[34m' : ''; | ||
| 29 | - module.exports.green = hasColors ? '\u001b[32m' : ''; | ||
| 30 | - module.exports.white = hasColors ? '\u001b[39m' : ''; | ||
| 31 | - module.exports.yellow = hasColors ? '\u001b[33m' : ''; | ||
| 32 | - module.exports.red = hasColors ? '\u001b[31m' : ''; | ||
| 33 | - module.exports.gray = hasColors ? '\u001b[90m' : ''; | ||
| 34 | - module.exports.clear = hasColors ? '\u001bc' : ''; | ||
| 35 | - module.exports.reset = hasColors ? '\u001b[0m' : ''; | ||
| 36 | - module.exports.hasColors = hasColors; | ||
| 27 | + if (module.exports.shouldColorize(process.stderr)) { | ||
| 28 | + module.exports.blue = '\u001b[34m'; | ||
| 29 | + module.exports.green = '\u001b[32m'; | ||
| 30 | + module.exports.white = '\u001b[39m'; | ||
| 31 | + module.exports.yellow = '\u001b[33m'; | ||
| 32 | + module.exports.red = '\u001b[31m'; | ||
| 33 | + module.exports.gray = '\u001b[90m'; | ||
| 34 | + module.exports.clear = '\u001bc'; | ||
| 35 | + module.exports.reset = '\u001b[0m'; | ||
| 36 | + module.exports.hasColors = true; | ||
| 37 | + } else { | ||
| 38 | + module.exports.blue = ''; | ||
| 39 | + module.exports.green = ''; | ||
| 40 | + module.exports.white = ''; | ||
| 41 | + module.exports.yellow = ''; | ||
| 42 | + module.exports.red = ''; | ||
| 43 | + module.exports.gray = ''; | ||
| 44 | + module.exports.clear = ''; | ||
| 45 | + module.exports.reset = ''; | ||
| 46 | + module.exports.hasColors = false; | ||
| 47 | + } | ||
| 37 | 48 | }, | |
| 38 | 49 | }; | |
| 39 | 50 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments