Simple JavaScript slugify
I confess. Me and regular expressions aren’t buddy, buddies. So it took some trial and error before reaching this point with something useful in the context of generating slugs. There are probably tons of scripts like these, but here we go. if (!String.prototype.toSlug) { String.prototype.toSlug…
Daniel Wertheim