Sometimes, we want to convert string to title case with Lodash and JavaScript.
In this article, we’ll look at how to convert string to title case with Lodash and JavaScript.
How to convert string to title case with Lodash and JavaScript?
To convert string to title case with Lodash and JavaScript, we call the startCase function.
For instance, we write
const s = _.startCase(_.toLower(str));
to call startCase with a string to convert the _.toLower(str) lower case string to a title case string.
Conclusion
To convert string to title case with Lodash and JavaScript, we call the startCase function.