Created
October 26, 2016 11:33
-
-
Save BrockReece/8eefe56ddd7cc098d2a612e654dbb9a2 to your computer and use it in GitHub Desktop.
Split slug into separate words and capitalise
This file contains 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
field.field_slug.split('_').join(' ').replace(/\b\w/g, l => l.toUpperCase()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment