(url: string)
| 322 | // Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 |
| 323 | const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/ |
| 324 | export const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url) |
| 325 | |
| 326 | export function getLocationOrigin() { |
| 327 | const { protocol, hostname, port } = window.location |
no test coverage detected