simov / slugify

Slugifies a string
MIT License
1.47k stars 126 forks source link

fix: remove() should work with multichar strings #166

Closed Trott closed 1 year ago

Trott commented 1 year ago

Fixes: https://github.com/simov/slugify/issues/164

BREAKING CHANGE: remove() behavior now aligns with Stirng.prototype.replace(). To remove more than the first instance/match, use a regular expression with the global (g) flag.

Trott commented 1 year ago

This is a (small) breaking change, but I prefer it to #165 for maintainability.