@firebase/util 1.9.7 → 1.10.0-canary.1c8dbee46
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 +18 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +18 -8
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +17 -7
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +17 -6
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +18 -8
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/deferred.d.ts +1 -1
- package/dist/node-esm/src/environment.d.ts +9 -2
- package/dist/node-esm/src/errors.d.ts +1 -1
- package/dist/node-esm/src/json.d.ts +1 -1
- package/dist/src/deferred.d.ts +1 -1
- package/dist/src/environment.d.ts +9 -2
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/json.d.ts +1 -1
- package/dist/util-public.d.ts +13 -5
- package/dist/util.d.ts +13 -5
- package/package.json +2 -2
package/dist/index.esm5.js
CHANGED
|
@@ -642,7 +642,7 @@ var Deferred = /** @class */ (function () {
|
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
644
|
/**
|
|
645
|
-
* Our API internals are not
|
|
645
|
+
* Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
|
|
646
646
|
* invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
|
|
647
647
|
* and returns a node-style callback which will resolve or reject the Deferred's promise.
|
|
648
648
|
*/
|
|
@@ -785,19 +785,29 @@ function isNode() {
|
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
/**
|
|
788
|
-
* Detect Browser Environment
|
|
788
|
+
* Detect Browser Environment.
|
|
789
|
+
* Note: This will return true for certain test frameworks that are incompletely
|
|
790
|
+
* mimicking a browser, and should not lead to assuming all browser APIs are
|
|
791
|
+
* available.
|
|
789
792
|
*/
|
|
790
793
|
function isBrowser() {
|
|
791
794
|
return typeof window !== 'undefined' || isWebWorker();
|
|
792
795
|
}
|
|
793
796
|
/**
|
|
794
|
-
* Detect Web Worker context
|
|
797
|
+
* Detect Web Worker context.
|
|
795
798
|
*/
|
|
796
799
|
function isWebWorker() {
|
|
797
800
|
return (typeof WorkerGlobalScope !== 'undefined' &&
|
|
798
801
|
typeof self !== 'undefined' &&
|
|
799
802
|
self instanceof WorkerGlobalScope);
|
|
800
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Detect Cloudflare Worker context.
|
|
806
|
+
*/
|
|
807
|
+
function isCloudflareWorker() {
|
|
808
|
+
return (typeof navigator !== 'undefined' &&
|
|
809
|
+
navigator.userAgent === 'Cloudflare-Workers');
|
|
810
|
+
}
|
|
801
811
|
function isBrowserExtension() {
|
|
802
812
|
var runtime = typeof chrome === 'object'
|
|
803
813
|
? chrome.runtime
|
|
@@ -1000,7 +1010,7 @@ function jsonEval(str) {
|
|
|
1000
1010
|
}
|
|
1001
1011
|
/**
|
|
1002
1012
|
* Returns JSON representing a javascript object.
|
|
1003
|
-
* @param {*} data
|
|
1013
|
+
* @param {*} data JavaScript object to be stringified.
|
|
1004
1014
|
* @return {string} The JSON contents of the object.
|
|
1005
1015
|
*/
|
|
1006
1016
|
function stringify(data) {
|
|
@@ -1612,7 +1622,7 @@ var ObserverProxy = /** @class */ (function () {
|
|
|
1612
1622
|
/**
|
|
1613
1623
|
* Subscribe function that can be used to add an Observer to the fan-out list.
|
|
1614
1624
|
*
|
|
1615
|
-
* - We require that no event is sent to a subscriber
|
|
1625
|
+
* - We require that no event is sent to a subscriber synchronously to their
|
|
1616
1626
|
* call to subscribe().
|
|
1617
1627
|
*/
|
|
1618
1628
|
ObserverProxy.prototype.subscribe = function (nextOrObserver, error, complete) {
|
|
@@ -1882,7 +1892,7 @@ function validateContextObject(fnName, argumentName, context, optional) {
|
|
|
1882
1892
|
// so it's been modified.
|
|
1883
1893
|
// Note that not all Unicode characters appear as single characters in JavaScript strings.
|
|
1884
1894
|
// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters
|
|
1885
|
-
// use 2 characters in
|
|
1895
|
+
// use 2 characters in JavaScript. All 4-byte UTF-8 characters begin with a first
|
|
1886
1896
|
// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate
|
|
1887
1897
|
// pair).
|
|
1888
1898
|
// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3
|
|
@@ -2115,5 +2125,5 @@ function getModularInstance(service) {
|
|
|
2115
2125
|
}
|
|
2116
2126
|
}
|
|
2117
2127
|
|
|
2118
|
-
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 };
|
|
2119
2129
|
//# sourceMappingURL=index.esm5.js.map
|