@shopify/cli-kit
    Preparing search index...

    Function extractHost

    • Extracts the lowercased hostname from a URL-shaped string. Tolerates bare hosts (without a scheme) and inputs that come back from APIs as either https://shop.myshopify.com or shop.myshopify.com.

      Parameters

      • value: string | null | undefined

        A URL or bare host string, possibly null/undefined.

      Returns string | undefined

      The lowercased hostname, or undefined when the input is empty.