@firebase/util 1.9.7-canary.fa0ed08fb → 1.9.7-canary.ff0475c41
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 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +10 -3
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +10 -3
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +10 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +10 -3
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/environment.d.ts +6 -2
- package/dist/src/environment.d.ts +6 -2
- package/dist/util-public.d.ts +7 -2
- package/dist/util.d.ts +7 -2
- package/package.json +2 -2
package/dist/index.node.cjs.js
CHANGED
|
@@ -789,7 +789,7 @@ function isNode() {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
/**
|
|
792
|
-
* Detect Browser Environment
|
|
792
|
+
* Detect Browser Environment.
|
|
793
793
|
* Note: This will return true for certain test frameworks that are incompletely
|
|
794
794
|
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
795
795
|
* available.
|
|
@@ -798,13 +798,20 @@ function isBrowser() {
|
|
|
798
798
|
return typeof window !== 'undefined' || isWebWorker();
|
|
799
799
|
}
|
|
800
800
|
/**
|
|
801
|
-
* Detect Web Worker context
|
|
801
|
+
* Detect Web Worker context.
|
|
802
802
|
*/
|
|
803
803
|
function isWebWorker() {
|
|
804
804
|
return (typeof WorkerGlobalScope !== 'undefined' &&
|
|
805
805
|
typeof self !== 'undefined' &&
|
|
806
806
|
self instanceof WorkerGlobalScope);
|
|
807
807
|
}
|
|
808
|
+
/**
|
|
809
|
+
* Detect Cloudflare Worker context.
|
|
810
|
+
*/
|
|
811
|
+
function isCloudflareWorker() {
|
|
812
|
+
return (typeof navigator !== 'undefined' &&
|
|
813
|
+
navigator.userAgent === 'Cloudflare-Workers');
|
|
814
|
+
}
|
|
808
815
|
function isBrowserExtension() {
|
|
809
816
|
var runtime = typeof chrome === 'object'
|
|
810
817
|
? chrome.runtime
|
|
@@ -2178,6 +2185,7 @@ exports.getUA = getUA;
|
|
|
2178
2185
|
exports.isAdmin = isAdmin;
|
|
2179
2186
|
exports.isBrowser = isBrowser;
|
|
2180
2187
|
exports.isBrowserExtension = isBrowserExtension;
|
|
2188
|
+
exports.isCloudflareWorker = isCloudflareWorker;
|
|
2181
2189
|
exports.isElectron = isElectron;
|
|
2182
2190
|
exports.isEmpty = isEmpty;
|
|
2183
2191
|
exports.isIE = isIE;
|