Last active
September 21, 2021 12:32
-
-
Save xiCO2k/cd149420edcaae20a6588ec90934c28c to your computer and use it in GitHub Desktop.
Capitalize Helper
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
const capitalize = str => str.replace(/^\w|\s\w/g, char => char.toUpperCase()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment