Created
September 15, 2022 15:23
-
-
Save Kernix13/c6035f82c5205fe9cb7268f8201bf1db to your computer and use it in GitHub Desktop.
Convert blog title to URL slug (my first gist)
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
const blogTitle = "How to create a GitHub Gist"; | |
const urlSlug = blogTitle.toLowerCase().split(" ").filter(word => word !== "").join("-"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment