aboutsummaryrefslogtreecommitdiff
path: root/utils/stringUtils.js
blob: 920dd50e7c10507d3db17ccbcbddc01c320d0ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
module.exports = {
    
    firstLetterCapital: function (string) {
        return string.substr(0, 1).toUpperCase() + string.substr(1)
    },

    firstLetterWordCapital: function (string) {
        return string.split(" ").map(firstLetterCapital).join(" ")
    }

}