Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is where babe doesn't do this part
- String.prototype.toTitleCase = function(n) {
- var s = this;
- if (1 !== n) s = s.toLowerCase();
- return s.replace(/\b[a-z]/g, function(f) {
- return f.toUpperCase()
- });
- }
- //and where she whatever
- var tags = {
- 1: "the-reality",
- 2: "your-life",
- 3: "your-voice",
- 4: "amped-up"
- };
- //and where she doesn't have underscore because the site is heavy even though i've been telling her start with underscore and it's 5.7kb for the min but heh
- _.each(tags, function(i) {
- var stringArray = i.replace(/-/g," "); stringArray = stringArray.toTitleCase();
- console.log(stringArray);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement