PabloVallejo
7/25/2013 - 8:06 PM

cammelCaseToSpace

cammelCaseToSpace

diff --git a/assets/js/helpers/utilities.js b/assets/js/helpers/utilities.js
index a34e884..86ac187 100644
--- a/assets/js/helpers/utilities.js
+++ b/assets/js/helpers/utilities.js
@@ -297,6 +297,18 @@
             }
 
             /**
+            * Converts a cammelcased string to a spaced one.
+            * `sampleStringHere` => `sample string here`
+            */
+        ,   cammelCaseToSpace: function( string ) {
+
+                return string.replace( /([A-Z])/g, function( $1 ) {
+
+                    return " " + $1 . toLowerCase();
+                });
+            }
+
+            /**
             * Converts hiphens to underscores
             */
         ,   hyphenToUnderscore: function( string ) {