MCPcopy Create free account
hub / github.com/Tencent/QMUI_Web / addColor

Method addColor

workflow/Util.js:31–43  ·  view source on GitHub ↗
(str, type)

Source from the content-addressed store, hash-verified

29
30
31 addColor(str, type) {
32 if (supportsColor() && (typeof argv.color === 'undefined' || argv.color)) {
33 if (type === 'warn') {
34 return this.colors.yellow(str);
35 } else if (type === 'error') {
36 return this.colors.red(str);
37 } else if (type === 'info') {
38 return this.colors.gray(str);
39 }
40 return this.colors.green(str);
41 }
42 return str;
43 }
44
45 log(tag, content) {
46 if (arguments.length > 1) {

Callers 5

logMethod · 0.95
warnMethod · 0.95
errorMethod · 0.95
proxy.jsFile · 0.80
server.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected