MCPcopy Create free account
hub / github.com/DavidWells/analytics / isExternal

Function isExternal

packages/analytics-util-url/src/index.js:105–107  ·  view source on GitHub ↗
(url, currentUrl)

Source from the content-addressed store, hash-verified

103 * @returns {boolean}
104 */
105export function isExternal(url, currentUrl) {
106 return parseUrl(url).hostname !== getLocation(currentUrl).hostname
107}
108
109/**
110 * Check if URL is localhost

Callers 3

isInternalFunction · 0.85
isExternalReferrerFunction · 0.85
parseReferrerFunction · 0.85

Calls 2

parseUrlFunction · 0.85
getLocationFunction · 0.85

Tested by

no test coverage detected