MCPcopy Index your code
hub / github.com/PatrickJS/angular-websocket / capWord

Function capWord

example/scripts.js:76–78  ·  view source on GitHub ↗
(txt)

Source from the content-addressed store, hash-verified

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 };

Callers 1

scripts.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…