diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-21 17:45:29 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-21 17:45:29 -0500 |
| commit | d6eea989f63e1e51563daa64873ce33166bc28c0 (patch) | |
| tree | 9431419465c7151a0927ec84970befc696581380 /StoneIsland/www/js/vendor/util.js | |
| parent | c223032bbd67fe5b6ad1334ce81a3f51a7631bfc (diff) | |
testin login stuff..
Diffstat (limited to 'StoneIsland/www/js/vendor/util.js')
| -rw-r--r-- | StoneIsland/www/js/vendor/util.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/StoneIsland/www/js/vendor/util.js b/StoneIsland/www/js/vendor/util.js index 0e48ce5a..fede4761 100644 --- a/StoneIsland/www/js/vendor/util.js +++ b/StoneIsland/www/js/vendor/util.js @@ -24,6 +24,10 @@ function rgba_string (rgb,a) { return "rgba(" + rgb.map(Math.round).join(",") + function hex_string (rgb) { return "#" + rgb.map(Math.round).map(function(n){ var s = n.toString(16); return s.length == 1 ? "0"+s : s }).join("") } function parse_rgba_string (s) { return s.match(/(\d+)/g).slice(0,3) } +function title_case (str) { + return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); +} + var E = Math.E var PI = Math.PI var PHI = (1+Math.sqrt(5))/2 |
