Last active
January 9, 2021 13:11
-
-
Save sebastianherman/e131397ec9fc29a09bd814f49f811f11 to your computer and use it in GitHub Desktop.
Functional Programming: Apply Functional Programming to Convert Strings to URL Slugs - freeCodeCamp solution
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 urlSlug(title) { | |
return title.split(/\W/).filter(item => item).map(item => item.toLowerCase()).join("-") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment