What unicode/non-Latin test cases are covered?
What unicode/non-Latin test cases are covered?
About sindresorhus/slugify · 2 messages · last activity 8/1/2026
The repository has comprehensive test coverage for non-Latin characters across multiple languages. Here are the covered test cases [test.js:L106-L145]:
German umlauts:
ä ö ü Ä Ö Ü ß→ transliterates toae oe ue Ae Oe Ue ss
Vietnamese:
ố Ừ Đ→ transliterates too U D
Arabic:
ث س و→ transliterates toth s w
Persian / Farsi:
چ ی پ→ transliterates toch y p
Urdu:
ٹ ڈ ھ→ transliterates tot d h
Pashto:
ګ ړ څ→ transliterates tog r c
Russian:
Ж п ю→ transliterates toZh p yu
Romanian:
ș Ț→ transliterates tos T
Turkish:
İ ı Ş ş Ç ç Ğ ğ→ transliterates toI i S s C c G g
Additionally, the tests verify behavior with the transliterate: false option [test.js:L246-L258], where non-ASCII characters are preserved instead:
Déjà Vu→déjà-vu(preserved)Räksmörgås→räksmörgås(preserved)你好世界(Chinese) → preserved as-isمرحبا(Arabic) → preserved as-is
The README also mentions locale-specific transliteration [test.js:L211-L227], with Swedish and German locales producing different outputs for the same input.
FOLLOW_UPS:
- How does the
transliterateoption affect performance? - What's the difference between locale-specific transliteration results?
- Which languages are supported by the transliterate dependency?
Want to ask your own question?
Open chat for sindresorhus/slugifyPublic Q&A. Generated by RepoPilot from the actual source of sindresorhus/slugify. AI answers can be incomplete or stale — verify before relying on them.