Last active
February 16, 2018 21:15
-
-
Save Jberivera/ec01d89fe314fd58b383a546eda8ebae to your computer and use it in GitHub Desktop.
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
| function capitalize (str) { | |
| return str.replace(/(\w)\w+/g, (match, g1) => `${g1.toUpperCase()}${match.substring(1)}`) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment