I need to sanitise strings of names (which may contain special characters) so that they are url friendly. For example a name may be:
The Red Hot Chili Peppers
A$AP Rocky
Christine & The Queens
Will.I.Am
These should be:
the-red-hot-chili-peppers
asap-rocky
christine-and-the-queens
will-i-am
Also other special characters like exclamation marks, slashes, dashes etc should be removed.
Is there a node module I can use to do this? How should I attempt this?