@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.
@@ -785,7 +785,7 @@ function isNode() {
785
785
  }
786
786
  }
787
787
  /**
788
- * Detect Browser Environment
788
+ * Detect Browser Environment.
789
789
  * Note: This will return true for certain test frameworks that are incompletely
790
790
  * mimicking a browser, and should not lead to assuming all browser APIs are
791
791
  * available.
@@ -794,13 +794,20 @@ function isBrowser() {
794
794
  return typeof window !== 'undefined' || isWebWorker();
795
795
  }
796
796
  /**
797
- * Detect Web Worker context
797
+ * Detect Web Worker context.
798
798
  */
799
799
  function isWebWorker() {
800
800
  return (typeof WorkerGlobalScope !== 'undefined' &&
801
801
  typeof self !== 'undefined' &&
802
802
  self instanceof WorkerGlobalScope);
803
803
  }
804
+ /**
805
+ * Detect Cloudflare Worker context.
806
+ */
807
+ function isCloudflareWorker() {
808
+ return (typeof navigator !== 'undefined' &&
809
+ navigator.userAgent === 'Cloudflare-Workers');
810
+ }
804
811
  function isBrowserExtension() {
805
812
  var runtime = typeof chrome === 'object'
806
813
  ? chrome.runtime
@@ -2118,5 +2125,5 @@ function getModularInstance(service) {
2118
2125
  }
2119
2126
  }
2120
2127
 
2121
- export { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
2128
+ export { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isCloudflareWorker, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, isWebWorker, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
2122
2129
  //# sourceMappingURL=index.esm5.js.map