Removes bad chars for a string key (all except number, lowercase ascii7 letters, dash - and underscore _)
It will allow uppercase ascii7 letters if option caseSensitive is false
If the mode is:
strict: it will allow just the standard set (0-9, a-z, -, and _)
dots => strict + .
specials => strict + ., |, ~, /, and :
It also removes multiple dashes in a row and replaces them for a single dash unless option replaceManyDashes: false is given
If no letters a-z or A-Z are found, and the option prependIfNoLetters is given, it will prepend it to the original string, and clean again.
If trimEdgeDashes is true, it will trim the edge dashes (-) from the beginning and end of the clean string
Removes bad chars for a string key (all except number, lowercase ascii7 letters, dash
-and underscore_) It will allow uppercase ascii7 letters if optioncaseSensitiveis false If the mode is:strict: it will allow just the standard set (0-9,a-z,-, and_)dots=> strict +.specials=> strict +.,|,~,/, and:It also removes multiple dashes in a row and replaces them for a single dash unless optionreplaceManyDashes: falseis given If no lettersa-zorA-Zare found, and the optionprependIfNoLettersis given, it will prepend it to the original string, and clean again. IftrimEdgeDashesis true, it will trim the edge dashes (-) from the beginning and end of the clean string