CML
    Preparing search index...

    Function getBaseUrl

    • Get the base URL from a full URL or a URL object.

      Parameters

      • fullUrl: string | URL

        The full URL or URL object.

      Returns string

      The base URL.

      const baseUrl = getBaseUrl('https://example.com/path/to/file.mp4')
      equal(baseUrl, 'https://example.com/path/to/')