@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.
@@ -775,7 +775,7 @@ function isNode() {
775
775
  }
776
776
  }
777
777
  /**
778
- * Detect Browser Environment
778
+ * Detect Browser Environment.
779
779
  * Note: This will return true for certain test frameworks that are incompletely
780
780
  * mimicking a browser, and should not lead to assuming all browser APIs are
781
781
  * available.
@@ -784,13 +784,20 @@ function isBrowser() {
784
784
  return typeof window !== 'undefined' || isWebWorker();
785
785
  }
786
786
  /**
787
- * Detect Web Worker context
787
+ * Detect Web Worker context.
788
788
  */
789
789
  function isWebWorker() {
790
790
  return (typeof WorkerGlobalScope !== 'undefined' &&
791
791
  typeof self !== 'undefined' &&
792
792
  self instanceof WorkerGlobalScope);
793
793
  }
794
+ /**
795
+ * Detect Cloudflare Worker context.
796
+ */
797
+ function isCloudflareWorker() {
798
+ return (typeof navigator !== 'undefined' &&
799
+ navigator.userAgent === 'Cloudflare-Workers');
800
+ }
794
801
  function isBrowserExtension() {
795
802
  const runtime = typeof chrome === 'object'
796
803
  ? chrome.runtime
@@ -2120,5 +2127,5 @@ function getModularInstance(service) {
2120
2127
  }
2121
2128
  }
2122
2129
 
2123
- 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 };
2130
+ 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 };
2124
2131
  //# sourceMappingURL=index.esm2017.js.map