Get the base URL from a full URL or a URL object.
The full URL or URL object.
The base URL.
const baseUrl = getBaseUrl('https://example.com/path/to/file.mp4')equal(baseUrl, 'https://example.com/path/to/') Copy
const baseUrl = getBaseUrl('https://example.com/path/to/file.mp4')equal(baseUrl, 'https://example.com/path/to/')
Get the base URL from a full URL or a URL object.