mqtt 5.3.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mqtt.js CHANGED
@@ -20274,7 +20274,13 @@ var mqtt = (() => {
20274
20274
  init_buffer2();
20275
20275
  init_process2();
20276
20276
  Object.defineProperty(exports5, "__esModule", { value: true });
20277
- var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" || typeof self === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope" || typeof navigator !== "undefined" && navigator.product === "ReactNative";
20277
+ var isStandardBrowserEnv = () => typeof window !== "undefined" && typeof window.document !== "undefined";
20278
+ var isWebWorkerEnv = () => {
20279
+ var _a, _b;
20280
+ return Boolean(typeof self === "object" && ((_b = (_a = self === null || self === void 0 ? void 0 : self.constructor) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.includes("WorkerGlobalScope")));
20281
+ };
20282
+ var isReactNativeEnv = () => typeof navigator !== "undefined" && navigator.product === "ReactNative";
20283
+ var isBrowser = isStandardBrowserEnv() || isWebWorkerEnv() || isReactNativeEnv();
20278
20284
  exports5.default = isBrowser;
20279
20285
  }
20280
20286
  });