sindresorhus / slugify

Slugify a string
MIT License
2.56k stars 81 forks source link

Added options to preserve Characters #59

Closed dersimoezdag closed 3 years ago

dersimoezdag commented 3 years ago

Option to preserve characters by adding them to the regex.

Changed \d to 0-9 due to the more efficient handling. All other characters except for 0-9 should be replaced by transliterate i think. https://stackoverflow.com/questions/16621738/d-less-efficient-than-0-9

sindresorhus commented 3 years ago

You did not address everything I commented on in your previous pull request. It's also useful to link to the previous pull request for context.

sindresorhus commented 3 years ago

Changed \d to 0-9 due to the more efficient handling.

Please don't do unrelated changes (saying it again). It's also irrelevant. JS regexes don't target Unicode by default.