CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
isURLSameOrigin.js15 linesDownload Raw Back to helpers
1import platform from '../platform/index.js';2 3export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {4  url = new URL(url, platform.origin);5 6  return (7    origin.protocol === url.protocol &&8    origin.host === url.host &&9    (isMSIE || origin.port === url.port)10  );11})(12  new URL(platform.origin),13  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)14) : () => true;15