(txt)
| 74 | }) |
| 75 | .filter('capitalize', function() { |
| 76 | function capWord(txt) { |
| 77 | return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); |
| 78 | } |
| 79 | return function(input, isEveryWord) { |
| 80 | return (!input) ? '' : (!isEveryWord) ? capWord(input) : input.replace(/([^\W_]+[^\s-]*) */g, capWord); |
| 81 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…