Uses Unicode-aware character classes so non-Latin scripts (e.g. Arabic,
Hebrew, CJK) produce meaningful slugs instead of collapsing to "".
When the result would still be empty (e.g. purely punctuation input) a
short deterministic hash is returned as a fallback.
Convert a string to a URL-safe slug.
Uses Unicode-aware character classes so non-Latin scripts (e.g. Arabic, Hebrew, CJK) produce meaningful slugs instead of collapsing to
"". When the result would still be empty (e.g. purely punctuation input) a short deterministic hash is returned as a fallback.