Here you can find the source of ucWords()
String.prototype.ucWords = function () { return this.split(' ').map(function (w) { return w.substr(0, 1).toUpperCase() + w.substr(1); }).join(' '); }
String.prototype.toUpperCaseFirst = function() { return this[0].toUpperCase() + this.substr(1); };
String.prototype.toUpperCaseFirst = function() { return this.slice(0,1).toUpperCase() + this.slice(1).toLowerCase(); };
window.upperCaseFirstLetter = (str)=>{ return str.replace(/^\w/, function(w){return w.toUpperCase()}); String.prototype.toUpperCaseFirstLetter = function(){ return upperCaseFirstLetter(this);
String.prototype.toUpperLowerCase = function() { var string = this.split(""); string[0] = string[0].toUpperCase(); return string.join(""); };
String.prototype.toUpperLowerCase = function() { var string = this.split(""); string[0] = string[0].toUpperCase(); return string.join(""); }; String.prototype.firstUpper = function() { return this.charAt(0).toUpperCase() + this.slice(1); };
String.prototype.uc_words = function(){ return this.replace( /(^|\s)([a-z])/g , function(m,p1,p2){return p1+p2.toUpperCase();}); };
String.prototype.ucwords = function() { return (this + '').replace(/^([a-z])|\s+([a-z])/g, function ($1) { return $1.toUpperCase(); });
String.prototype.ucwords = function () { var words = this.split(' '); for (var i = 0; i < words.length; i++) words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1); return words.join(' '); }; module.exports = function () { };
String.prototype.ucwords = function(){ var arr = this.split(' '); var str =''; arr.forEach(function(v){ str += v.charAt(0).toUpperCase()+v.slice(1,v.length)+' '; }); return str; };