UNPKG

solutaaliquid

Version:

common utils for javascript. Utils to get the global scope (browser, webworker & co.). Customizable string escaper. Utilitize for objects. Extension at base javascript api (usefull extention like String.hashcode()).

11 lines (10 loc) 321 B
import GLOBAL from "@default-js/defaultjs-common-utils/src/Global"; export const SERVICEURL = (() => { try{ return new URL(import.meta.url, location); }catch(e){} try{ return new URL(document.currentScript.src, location); }catch(e){} return new URL(GLOBAL.SERVICEURL, location); })();