Comparing version 4.0.1 to 4.1.0
{ | ||
"name": "quarx", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Simple dependency graph engine, MobX inspired", | ||
@@ -5,0 +5,0 @@ "type": "module", |
const TAG = '@dmaevsky/quarx'; | ||
const GLOBAL = typeof window === 'object' ? window : | ||
typeof global === 'object' ? global : {}; | ||
if (GLOBAL[TAG]) { | ||
console.log(`[Quarx]: WARNING!!! Another instance of Quarx is already initialized. | ||
This means code duplication and will possibly break in the future!`); | ||
if (globalThis[TAG]) { | ||
console.log(`[Quarx]: WARNING!!! Found multiple Quarx instances: | ||
---> ${globalThis[TAG].url} (globals) | ||
---> ${import.meta.url} | ||
This means code duplication and will possibly break in the future!`); | ||
} | ||
else GLOBAL[TAG] = { | ||
else globalThis[TAG] = { | ||
url: import.meta.url, | ||
stack: [], | ||
@@ -20,3 +21,3 @@ invalidated: new Set(), | ||
export const Quarx = GLOBAL[TAG]; | ||
export const Quarx = globalThis[TAG]; | ||
@@ -23,0 +24,0 @@ function tryCatch(fn, onError) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258
15823