summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/vendor/util.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-21 17:45:29 -0500
committerJules Laplace <jules@okfoc.us>2015-11-21 17:45:29 -0500
commitd6eea989f63e1e51563daa64873ce33166bc28c0 (patch)
tree9431419465c7151a0927ec84970befc696581380 /StoneIsland/www/js/vendor/util.js
parentc223032bbd67fe5b6ad1334ce81a3f51a7631bfc (diff)
testin login stuff..
Diffstat (limited to 'StoneIsland/www/js/vendor/util.js')
-rw-r--r--StoneIsland/www/js/vendor/util.js4
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