Created
May 7, 2020 10:38
-
-
Save ediblecode/a23265366e747a718dc659804979845b to your computer and use it in GitHub Desktop.
Slugify a pascal cased string
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
"PrescribingInfo".replace(/(.+)([A-Z])/g, (s, p1, p2) => `${p1}-${p2}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment