Code coverage report for string/properCase.js

Statements: 100% (6 / 6)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (5 / 5)     

All files » string/ » properCase.js
1 2 3 4 5 6 7 8 9 10 11 121       1 3 3     1    
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;
});