You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {string|Object} msg - The message to be printed. It can be a non-string type, in which case it will be serialized before printing.
21
+
* @param {Chalk} color - (Optional) The color of the message to be printed.
22
+
* If not provided, default color white is used.
23
+
*/
19
24
functionprint(msg,color=chalk.white){
20
25
console.log(color(formatMessage(msg)));
21
26
}
22
27
28
+
/**
29
+
* Prints an error message in console.
30
+
* @param {string|Object} msg - The error message to be printed. It can be a non-string type, in which case it will be serialized before printing.
31
+
*/
23
32
functionerror(msg){
24
33
console.log(chalk.red(formatMessage(msg)));
25
34
}
26
35
36
+
/**
37
+
* Prints a warning message in console.
38
+
* @param {string|Object} msg - The warning message to be printed. It can be a non-string type, in which case it will be serialized before printing.
39
+
*/
27
40
functionwarning(msg){
28
41
console.log(chalk.yellow(formatMessage(msg)));
29
42
}
30
43
44
+
/**
45
+
* Prints an infomation message in console.
46
+
* @param {string|Object} msg - The information message to be printed. It can be a non-string type, in which case it will be serialized before printing.
47
+
*/
31
48
functioninfo(msg){
32
49
console.log(chalk.cyan(formatMessage(msg)));
33
50
}
34
51
52
+
/**
53
+
* Prints a verbose message in console.
54
+
* @param {string|Object} msg - The verbose message to be printed. It can be a non-string type, in which case it will be serialized before printing.
0 commit comments