Last active
November 28, 2021 00:36
-
-
Save avoidwork/760ef9c6a41bca9cb24490ef88c22ec5 to your computer and use it in GitHub Desktop.
hyphenize.js
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 hyphenize (arg = '') { | |
return arg.match(/([a-z]{1,2})/ig).join('-'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment