I built a Javascript function to make the first letter uppercase. My issue is that I have some words which are like "name_something" and what I want is "Name Something".
I did this:
function toCamelCase(text) {
return text.replace(/\b(\w)/g, function (match, capture) {
return capture.toUpperCase();
}).split(/[^a-zA-Z]/);
}