"""Small text utilities with no natural home elsewhere.""" from __future__ import annotations import re _SLUG_STRIP_RE = re.compile(r"[^a-z0-9]+") def slugify(value: str) -> str: value = value.strip().lower() value = _SLUG_STRIP_RE.sub("-", value).strip("-") return value or "company"