RepoPilot

What unicode/non-Latin test cases are covered?

About sindresorhus/slugify · 2 messages · last activity 6/1/2026

Question

What unicode/non-Latin test cases are covered?

RepoPilot

The repository includes comprehensive test coverage for multiple non-Latin scripts. Here are the unicode/non-Latin test cases covered:

German umlauts [test.js:L113-L115]:

  • ä ö ü Ä Ö Ü ß → transliterates to ae oe ue Ae Oe Ue ss

Vietnamese [test.js:L118-L120]:

  • ố Ừ Đ → transliterates to o U D

Arabic [test.js:L123-L125]:

  • ث س و → transliterates to th s w

Persian/Farsi [test.js:L128-L130]:

  • چ ی پ → transliterates to ch y p

Urdu [test.js:L133-L135]:

  • ٹ ڈ ھ → transliterates to t d h

Pashto [test.js:L138-L140]:

  • ګ ړ څ → transliterates to g r c

Russian [test.js:L143-L145]:

  • Ж п ю → transliterates to Zh p yu

Romanian [test.js:L148-L150]:

  • ș Ț → transliterates to s T

Turkish [test.js:L153-L155]:

  • İ ı Ş ş Ç ç Ğ ğ → transliterates to I i S s C c G g

Armenian [test.js:L158-L160]:

  • Ե ր ե ւ ա ն → transliterates to Ye r ye a n

Locale-specific transliteration [test.js:L218-L226]:

  • Swedish vs. German behavior for Räksmörgås and Fön with different locale options

Additionally, there are tests for non-ASCII preservation [test.js:L233-L240] when transliterate: false is used, including Chinese (你好世界) and Arabic (مرحبا).

FOLLOW_UPS:

  • How does the transliterate option affect behavior?
  • What custom replacements are built-in by default?
  • How do locale-specific options work exactly?

Want to ask your own question?

Open chat for sindresorhus/slugify

Public Q&A. Generated by RepoPilot from the actual source of sindresorhus/slugify. AI answers can be incomplete or stale — verify before relying on them.