WeCodeAcademy

Convert a string to a URL slug

Lower-case it, replace anything that is not a letter or number with a dash, and trim the ends.

Examplejavascript
Open in editor »

More JavaScript recipes