@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.cjs.js
CHANGED
|
@@ -782,7 +782,15 @@ function isNode() {
|
|
|
782
782
|
* Detect Browser Environment
|
|
783
783
|
*/
|
|
784
784
|
function isBrowser() {
|
|
785
|
-
return typeof
|
|
785
|
+
return typeof window !== 'undefined' || isWebWorker();
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Detect Web Worker context
|
|
789
|
+
*/
|
|
790
|
+
function isWebWorker() {
|
|
791
|
+
return (typeof WorkerGlobalScope !== 'undefined' &&
|
|
792
|
+
typeof self !== 'undefined' &&
|
|
793
|
+
self instanceof WorkerGlobalScope);
|
|
786
794
|
}
|
|
787
795
|
function isBrowserExtension() {
|
|
788
796
|
const runtime = typeof chrome === 'object'
|
|
@@ -2162,6 +2170,7 @@ exports.isSafari = isSafari;
|
|
|
2162
2170
|
exports.isUWP = isUWP;
|
|
2163
2171
|
exports.isValidFormat = isValidFormat;
|
|
2164
2172
|
exports.isValidTimestamp = isValidTimestamp;
|
|
2173
|
+
exports.isWebWorker = isWebWorker;
|
|
2165
2174
|
exports.issuedAtTime = issuedAtTime;
|
|
2166
2175
|
exports.jsonEval = jsonEval;
|
|
2167
2176
|
exports.map = map;
|