Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.parseTitle = function (value) {
- if (!value) { return; }
- var result = value
- .replace(/_([a-zA-Z])/g, " $1").split(' ').map(d => d.charAt(0).toUpperCase() + d.slice(1)).join(' ')
- .replace(/([A-Z])/g, " $1");
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement