Preparing search index...
    • Extracts the hostname from a URL, stripping the www. prefix if present.

      Parameters

      • url: string

        A URL string to parse.

      Returns string

      The hostname without the www. prefix, or an empty string if the URL is invalid.