Hiyve Components - v1.0.0
    Preparing search index...

    Function getDisplayName

    • Derive a display-friendly name from a user id.

      Parameters

      • userId: string | null | undefined

        The user id (email, underscore-separated handle, etc.)

      Returns string

      A display-friendly name (title-cased; empty input → "Unknown")

      • Email addresses use the local part: john.doe@example.com"John Doe".
      • Underscore / dot / dash handles are title-cased: john_doe_123"John Doe 123".
      • Bare words are just title-cased: johndoe"Johndoe".

      Designed as a safe fallback when a real display name isn't available (e.g. room-summary documents where the upstream service stored a placeholder like Guest-<8chars> — see isAutoGeneratedGuestName).

      getDisplayName('john.doe@example.com');  // "John Doe"
      getDisplayName('jane_smith'); // "Jane Smith"
      getDisplayName(''); // "Unknown"