talha-asad / mongoose-url-slugs

Create URL compatiable slugs on mongoose models, ensuring uniqueness.
MIT License
40 stars 22 forks source link

Bug on create slug from value starting with emoji #53

Open KubaWysocki opened 3 years ago

KubaWysocki commented 3 years ago

When you try to create a slug from value starting with emoji slug starts with separator and I think that is not expected behaviour. String 😀 hehe is slugified too -hehe instead of hehe

Same for @# hehe -> -hehe

Why can't separator be an empty string?