@firebase/util 1.9.6 → 1.9.7-20240702143745
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/index.cjs.js +10 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +10 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +10 -2
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +10 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +10 -2
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/environment.d.ts +4 -0
- package/dist/src/environment.d.ts +4 -0
- package/dist/util-public.d.ts +5 -0
- package/dist/util.d.ts +5 -0
- package/package.json +2 -1
package/dist/index.node.cjs.js
CHANGED
|
@@ -792,7 +792,15 @@ function isNode() {
|
|
|
792
792
|
* Detect Browser Environment
|
|
793
793
|
*/
|
|
794
794
|
function isBrowser() {
|
|
795
|
-
return typeof
|
|
795
|
+
return typeof window !== 'undefined' || isWebWorker();
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Detect Web Worker context
|
|
799
|
+
*/
|
|
800
|
+
function isWebWorker() {
|
|
801
|
+
return (typeof WorkerGlobalScope !== 'undefined' &&
|
|
802
|
+
typeof self !== 'undefined' &&
|
|
803
|
+
self instanceof WorkerGlobalScope);
|
|
796
804
|
}
|
|
797
805
|
function isBrowserExtension() {
|
|
798
806
|
var runtime = typeof chrome === 'object'
|
|
@@ -2179,6 +2187,7 @@ exports.isSafari = isSafari;
|
|
|
2179
2187
|
exports.isUWP = isUWP;
|
|
2180
2188
|
exports.isValidFormat = isValidFormat;
|
|
2181
2189
|
exports.isValidTimestamp = isValidTimestamp;
|
|
2190
|
+
exports.isWebWorker = isWebWorker;
|
|
2182
2191
|
exports.issuedAtTime = issuedAtTime;
|
|
2183
2192
|
exports.jsonEval = jsonEval;
|
|
2184
2193
|
exports.map = map;
|