You can use the _.toUpper()
function from lodash to convert strings to uppercase.
Here's an example:
index.tsx161 chars7 lines
In this code snippet, we first require the lodash library using const _ = require('lodash')
. Then we define a string myString
with the value "hello world".
We then call the _.toUpper()
function on myString
and assign the result to uppercaseString
. Finally, we log uppercaseString
to the console, which will output "HELLO WORLD".
Note that we need to provide the _.toUpper()
function with a string as an argument in order for it to work.
gistlibby LogSnag