I want to Upper case a string, I've tried this, but none of them works
format.printf((info:any) => `${info.timestamp} ${upperCase(info.level)}: ${info.message}`)
format.printf((info:any) => `${info.timestamp} ${capitalize.words(info.level)}: ${info.message}`)
format.printf((info:any) => `${info.timestamp} ${capitalize(info.level)}: ${info.message}`)
Try to use JavaScript built-in function toUpperCase().
Something like below.
var str = "Hello World!";
var res = str.toUpperCase();
console.log(res) // "HELLO WORLD!"
Official guide: https://www.w3schools.com/jsref/jsref_touppercase.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With