simov / slugify

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

`en` locale (default) #154

Closed strarsis closed 2 years ago

strarsis commented 2 years ago

Passing no locale (undefined) to slugify makes it apply slugify rules for the English locale (by default). en as locale is currently handled as unknown locale by slugify, with null as returned result. I have to pass en locales as undefined to make it work. It would be nice if slugify treats the en locale as English (undefined).

Trott commented 2 years ago

Can you provide an example of something that works as you expect with locale: undefined but not locale: 'en'? If I do slugify('hello world', {locale: 'en'}), that works as expected. slugify('%', {locale: 'en'}) works as expected too.

strarsis commented 2 years ago

@Trott: You are right, for whatever reason I encountered this issue. But while creating some tests, I wasn't able to reproduce the issue. 🤷‍♂️