UNPKG

@layr/browser-navigator

Version:

Provides a navigation system for a Layr app running in a browser

21 lines 648 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isInternalURL = void 0; function isInternalURL(url) { if (!(url instanceof URL)) { url = new URL(url, 'internal:/'); } if (url.protocol === 'internal:') { return true; } const currentURL = new URL(window.location.href); if (url.protocol === currentURL.protocol && url.username === currentURL.username && url.password === currentURL.password && url.host === currentURL.host) { return true; } return false; } exports.isInternalURL = isInternalURL; //# sourceMappingURL=utilities.js.map