Created
July 1, 2019 18:51
-
-
Save maggiben/90e092278e2632ce7a163d10be5a4c65 to your computer and use it in GitHub Desktop.
replace underscore with spaces and uppercase each word
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "animal_brand_name".replace(/_/g, ' ').replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment