Code coverage report for string/removeNonWord.js

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

All files » string/ » removeNonWord.js
1 2 3 4 5 6 7 8 9 10 11 121       1 42 42     1    
define(['../lang/toString'], function(toString){
    /**
     * Remove non-word chars.
     */
    function removeNonWord(str){
        str = toString(str);
        return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-]/g, '');
    }
 
    return removeNonWord;
});