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/build/lib/is-browser.js +8 -5
- package/build/lib/is-browser.js.map +1 -1
- package/build/lib/shared.d.ts +1 -1
- package/build/lib/shared.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +5 -5
- package/dist/mqtt.js +7 -1
- package/dist/mqtt.min.js +5 -5
- package/package.json +1 -1
- package/src/lib/is-browser.ts +15 -8
- package/src/lib/shared.ts +2 -1
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
|
|
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
|
});
|