How to check if a string is a valid URL slug in JavaScript?
Originally Published Here ๐!
To check if a string is a valid URL slug, we can use a regex expression to match for strings that are small English alphabets separated by a dash in JavaScript.
TL;DR
// Regular expression to check if string is a valid u...
melvingeorge-me.hashnode.dev2 min read