Current section

Files

Jump to
udia assets node_modules mout src string properCase.js
Raw

assets/node_modules/mout/src/string/properCase.js

define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){
/**
* UPPERCASE first char of each word.
*/
function properCase(str){
str = toString(str);
return lowerCase(str).replace(/^\w|\s\w/g, upperCase);
}
return properCase;
});