Code coverage report for string/unCamelCase.js

Statements: 100% (5 / 5)      Branches: 50% (1 / 2)      Functions: 100% (3 / 3)      Lines: 100% (4 / 4)     

All files » string/ » unCamelCase.js
1 2 3 4 5 6 7 8 9 10 11 12 13 141               1 14   1    
define(function(){
    /**
     * Add space between camelCase text.
     * @example unCamelCase('loremIpsumDolor') -> 'lorem ipsum dolor'
     * @param {string} str
     * @return {string}
     * @version 0.1.0 (2011/08/09)
     */
    function unCamelCase(str){
        return (str || '').replace(/([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g, '$1 $2').toLowerCase(); //add space between camelCase text
    }
    return unCamelCase;
});