Skip to content

Instantly share code, notes, and snippets.

@sebastianherman
Last active January 9, 2021 13:11
Functional Programming: Apply Functional Programming to Convert Strings to URL Slugs - freeCodeCamp solution
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