SHARE
TWEET

Untitled

a guest Nov 19th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $scope.parseTitle = function (value) {
  2.       if (!value) { return; }
  3.       var result = value
  4.         .replace(/_([a-zA-Z])/g, " $1").split(' ').map(d => d.charAt(0).toUpperCase() + d.slice(1)).join(' ')
  5.         .replace(/([A-Z])/g, " $1");
  6.       return result;
  7.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top