Last active
May 30, 2020 16:22
-
-
Save olaysco/10285572e99bdb59131d41652160ceaa to your computer and use it in GitHub Desktop.
camelCase to snake_case
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 snake_case = "topLeftRightH".replace(/([A-Z])/g, " $1").toLowerCase().replace(/( )/g,'_'); | |
// "top_left_right_h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment