adding proper billing cycle and cleaning org signup

This commit is contained in:
Arjun Patel
2019-02-03 22:15:04 -08:00
parent 79112d9e48
commit 17706cb1a0
5 changed files with 101 additions and 56 deletions
+14
View File
@@ -0,0 +1,14 @@
module.exports = {
titleCase: function(str) {
var splitStr = str.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
// You do not need to check if i is larger than splitStr length, as your for does that for you
// Assign it back to the array
splitStr[i] =
splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
}
// Directly return the joined string
return splitStr.join(' ');
}
};