@firebase/util 1.7.3 → 1.8.0-canary.06dc1364d
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/CHANGELOG.md +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm2017.js +181 -146
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +190 -155
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +190 -154
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.d.ts +1 -0
- package/dist/node-esm/index.d.ts +1 -0
- package/dist/node-esm/index.node.d.ts +1 -0
- package/dist/node-esm/index.node.esm.js +181 -146
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/defaults.d.ts +13 -0
- package/dist/node-esm/src/environment.d.ts +1 -6
- package/dist/node-esm/src/global.d.ts +22 -0
- package/dist/node-esm/test/environments.test.d.ts +17 -0
- package/dist/src/defaults.d.ts +13 -0
- package/dist/src/environment.d.ts +1 -6
- package/dist/src/global.d.ts +22 -0
- package/dist/test/environments.test.d.ts +17 -0
- package/dist/util-public.d.ts +32 -1
- package/dist/util.d.ts +32 -1
- package/package.json +2 -2
package/dist/index.esm5.js
CHANGED
|
@@ -451,7 +451,7 @@ function isValidKey(key) {
|
|
|
451
451
|
|
|
452
452
|
/**
|
|
453
453
|
* @license
|
|
454
|
-
* Copyright
|
|
454
|
+
* Copyright 2022 Google LLC
|
|
455
455
|
*
|
|
456
456
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
457
457
|
* you may not use this file except in compliance with the License.
|
|
@@ -465,151 +465,10 @@ function isValidKey(key) {
|
|
|
465
465
|
* See the License for the specific language governing permissions and
|
|
466
466
|
* limitations under the License.
|
|
467
467
|
*/
|
|
468
|
-
/**
|
|
469
|
-
* Returns navigator.userAgent string or '' if it's not defined.
|
|
470
|
-
* @return user agent string
|
|
471
|
-
*/
|
|
472
|
-
function getUA() {
|
|
473
|
-
if (typeof navigator !== 'undefined' &&
|
|
474
|
-
typeof navigator['userAgent'] === 'string') {
|
|
475
|
-
return navigator['userAgent'];
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
return '';
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
|
|
483
|
-
*
|
|
484
|
-
* Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
|
|
485
|
-
* in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
|
|
486
|
-
* wait for a callback.
|
|
487
|
-
*/
|
|
488
|
-
function isMobileCordova() {
|
|
489
|
-
return (typeof window !== 'undefined' &&
|
|
490
|
-
// @ts-ignore Setting up an broadly applicable index signature for Window
|
|
491
|
-
// just to deal with this case would probably be a bad idea.
|
|
492
|
-
!!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&
|
|
493
|
-
/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Detect Node.js.
|
|
497
|
-
*
|
|
498
|
-
* @return true if Node.js environment is detected.
|
|
499
|
-
*/
|
|
500
|
-
// Node detection logic from: https://github.com/iliakan/detect-node/
|
|
501
|
-
function isNode() {
|
|
502
|
-
try {
|
|
503
|
-
return (Object.prototype.toString.call(global.process) === '[object process]');
|
|
504
|
-
}
|
|
505
|
-
catch (e) {
|
|
506
|
-
return false;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* Detect Browser Environment
|
|
511
|
-
*/
|
|
512
|
-
function isBrowser() {
|
|
513
|
-
return typeof self === 'object' && self.self === self;
|
|
514
|
-
}
|
|
515
|
-
function isBrowserExtension() {
|
|
516
|
-
var runtime = typeof chrome === 'object'
|
|
517
|
-
? chrome.runtime
|
|
518
|
-
: typeof browser === 'object'
|
|
519
|
-
? browser.runtime
|
|
520
|
-
: undefined;
|
|
521
|
-
return typeof runtime === 'object' && runtime.id !== undefined;
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* Detect React Native.
|
|
525
|
-
*
|
|
526
|
-
* @return true if ReactNative environment is detected.
|
|
527
|
-
*/
|
|
528
|
-
function isReactNative() {
|
|
529
|
-
return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');
|
|
530
|
-
}
|
|
531
|
-
/** Detects Electron apps. */
|
|
532
|
-
function isElectron() {
|
|
533
|
-
return getUA().indexOf('Electron/') >= 0;
|
|
534
|
-
}
|
|
535
|
-
/** Detects Internet Explorer. */
|
|
536
|
-
function isIE() {
|
|
537
|
-
var ua = getUA();
|
|
538
|
-
return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
|
|
539
|
-
}
|
|
540
|
-
/** Detects Universal Windows Platform apps. */
|
|
541
|
-
function isUWP() {
|
|
542
|
-
return getUA().indexOf('MSAppHost/') >= 0;
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Detect whether the current SDK build is the Node version.
|
|
546
|
-
*
|
|
547
|
-
* @return true if it's the Node SDK build.
|
|
548
|
-
*/
|
|
549
|
-
function isNodeSdk() {
|
|
550
|
-
return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;
|
|
551
|
-
}
|
|
552
|
-
/** Returns true if we are running in Safari. */
|
|
553
|
-
function isSafari() {
|
|
554
|
-
return (!isNode() &&
|
|
555
|
-
navigator.userAgent.includes('Safari') &&
|
|
556
|
-
!navigator.userAgent.includes('Chrome'));
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
|
-
* This method checks if indexedDB is supported by current browser/service worker context
|
|
560
|
-
* @return true if indexedDB is supported by current browser/service worker context
|
|
561
|
-
*/
|
|
562
|
-
function isIndexedDBAvailable() {
|
|
563
|
-
return typeof indexedDB === 'object';
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject
|
|
567
|
-
* if errors occur during the database open operation.
|
|
568
|
-
*
|
|
569
|
-
* @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox
|
|
570
|
-
* private browsing)
|
|
571
|
-
*/
|
|
572
|
-
function validateIndexedDBOpenable() {
|
|
573
|
-
return new Promise(function (resolve, reject) {
|
|
574
|
-
try {
|
|
575
|
-
var preExist_1 = true;
|
|
576
|
-
var DB_CHECK_NAME_1 = 'validate-browser-context-for-indexeddb-analytics-module';
|
|
577
|
-
var request_1 = self.indexedDB.open(DB_CHECK_NAME_1);
|
|
578
|
-
request_1.onsuccess = function () {
|
|
579
|
-
request_1.result.close();
|
|
580
|
-
// delete database only when it doesn't pre-exist
|
|
581
|
-
if (!preExist_1) {
|
|
582
|
-
self.indexedDB.deleteDatabase(DB_CHECK_NAME_1);
|
|
583
|
-
}
|
|
584
|
-
resolve(true);
|
|
585
|
-
};
|
|
586
|
-
request_1.onupgradeneeded = function () {
|
|
587
|
-
preExist_1 = false;
|
|
588
|
-
};
|
|
589
|
-
request_1.onerror = function () {
|
|
590
|
-
var _a;
|
|
591
|
-
reject(((_a = request_1.error) === null || _a === void 0 ? void 0 : _a.message) || '');
|
|
592
|
-
};
|
|
593
|
-
}
|
|
594
|
-
catch (error) {
|
|
595
|
-
reject(error);
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
*
|
|
601
|
-
* This method checks whether cookie is enabled within current browser
|
|
602
|
-
* @return true if cookie is enabled within current browser
|
|
603
|
-
*/
|
|
604
|
-
function areCookiesEnabled() {
|
|
605
|
-
if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {
|
|
606
|
-
return false;
|
|
607
|
-
}
|
|
608
|
-
return true;
|
|
609
|
-
}
|
|
610
468
|
/**
|
|
611
469
|
* Polyfill for `globalThis` object.
|
|
612
470
|
* @returns the `globalThis` object for the given environment.
|
|
471
|
+
* @public
|
|
613
472
|
*/
|
|
614
473
|
function getGlobal() {
|
|
615
474
|
if (typeof self !== 'undefined') {
|
|
@@ -645,8 +504,11 @@ var getDefaultsFromGlobal = function () {
|
|
|
645
504
|
};
|
|
646
505
|
/**
|
|
647
506
|
* Attempt to read defaults from a JSON string provided to
|
|
648
|
-
* process.env.__FIREBASE_DEFAULTS__ or a JSON file whose path is in
|
|
649
|
-
* process.env.__FIREBASE_DEFAULTS_PATH__
|
|
507
|
+
* process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in
|
|
508
|
+
* process(.)env(.)__FIREBASE_DEFAULTS_PATH__
|
|
509
|
+
* The dots are in parens because certain compilers (Vite?) cannot
|
|
510
|
+
* handle seeing that variable in comments.
|
|
511
|
+
* See https://github.com/firebase/firebase-js-sdk/issues/6838
|
|
650
512
|
*/
|
|
651
513
|
var getDefaultsFromEnvVariable = function () {
|
|
652
514
|
if (typeof process === 'undefined' || typeof process.env === 'undefined') {
|
|
@@ -678,6 +540,7 @@ var getDefaultsFromCookie = function () {
|
|
|
678
540
|
* (1) if such an object exists as a property of `globalThis`
|
|
679
541
|
* (2) if such an object was provided on a shell environment variable
|
|
680
542
|
* (3) if such an object exists in a cookie
|
|
543
|
+
* @public
|
|
681
544
|
*/
|
|
682
545
|
var getDefaults = function () {
|
|
683
546
|
try {
|
|
@@ -692,7 +555,7 @@ var getDefaults = function () {
|
|
|
692
555
|
* info instead of swallowing so we can find these unknown cases
|
|
693
556
|
* and add paths for them if needed.
|
|
694
557
|
*/
|
|
695
|
-
console.info("Unable to get __FIREBASE_DEFAULTS__ due to: "
|
|
558
|
+
console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e));
|
|
696
559
|
return;
|
|
697
560
|
}
|
|
698
561
|
};
|
|
@@ -716,7 +579,7 @@ var getDefaultEmulatorHostnameAndPort = function (productName) {
|
|
|
716
579
|
}
|
|
717
580
|
var separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.
|
|
718
581
|
if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {
|
|
719
|
-
throw new Error("Invalid host "
|
|
582
|
+
throw new Error("Invalid host ".concat(host, " with no separate hostname and port!"));
|
|
720
583
|
}
|
|
721
584
|
// eslint-disable-next-line no-restricted-globals
|
|
722
585
|
var port = parseInt(host.substring(separatorIndex + 1), 10);
|
|
@@ -738,7 +601,7 @@ var getDefaultAppConfig = function () { var _a; return (_a = getDefaults()) ===
|
|
|
738
601
|
* prefixed by "_")
|
|
739
602
|
* @public
|
|
740
603
|
*/
|
|
741
|
-
var getExperimentalSetting = function (name) { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a["_"
|
|
604
|
+
var getExperimentalSetting = function (name) { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a["_".concat(name)]; };
|
|
742
605
|
|
|
743
606
|
/**
|
|
744
607
|
* @license
|
|
@@ -831,7 +694,7 @@ function createMockUserToken(token, projectId) {
|
|
|
831
694
|
}
|
|
832
695
|
var payload = __assign({
|
|
833
696
|
// Set all required fields to decent defaults
|
|
834
|
-
iss: "https://securetoken.google.com/"
|
|
697
|
+
iss: "https://securetoken.google.com/".concat(project), aud: project, iat: iat, exp: iat + 3600, auth_time: iat, sub: sub, user_id: sub, firebase: {
|
|
835
698
|
sign_in_provider: 'custom',
|
|
836
699
|
identities: {}
|
|
837
700
|
} }, token);
|
|
@@ -844,6 +707,178 @@ function createMockUserToken(token, projectId) {
|
|
|
844
707
|
].join('.');
|
|
845
708
|
}
|
|
846
709
|
|
|
710
|
+
/**
|
|
711
|
+
* @license
|
|
712
|
+
* Copyright 2017 Google LLC
|
|
713
|
+
*
|
|
714
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
715
|
+
* you may not use this file except in compliance with the License.
|
|
716
|
+
* You may obtain a copy of the License at
|
|
717
|
+
*
|
|
718
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
719
|
+
*
|
|
720
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
721
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
722
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
723
|
+
* See the License for the specific language governing permissions and
|
|
724
|
+
* limitations under the License.
|
|
725
|
+
*/
|
|
726
|
+
/**
|
|
727
|
+
* Returns navigator.userAgent string or '' if it's not defined.
|
|
728
|
+
* @return user agent string
|
|
729
|
+
*/
|
|
730
|
+
function getUA() {
|
|
731
|
+
if (typeof navigator !== 'undefined' &&
|
|
732
|
+
typeof navigator['userAgent'] === 'string') {
|
|
733
|
+
return navigator['userAgent'];
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
return '';
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.
|
|
741
|
+
*
|
|
742
|
+
* Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap
|
|
743
|
+
* in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally
|
|
744
|
+
* wait for a callback.
|
|
745
|
+
*/
|
|
746
|
+
function isMobileCordova() {
|
|
747
|
+
return (typeof window !== 'undefined' &&
|
|
748
|
+
// @ts-ignore Setting up an broadly applicable index signature for Window
|
|
749
|
+
// just to deal with this case would probably be a bad idea.
|
|
750
|
+
!!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&
|
|
751
|
+
/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Detect Node.js.
|
|
755
|
+
*
|
|
756
|
+
* @return true if Node.js environment is detected or specified.
|
|
757
|
+
*/
|
|
758
|
+
// Node detection logic from: https://github.com/iliakan/detect-node/
|
|
759
|
+
function isNode() {
|
|
760
|
+
var _a;
|
|
761
|
+
var forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;
|
|
762
|
+
if (forceEnvironment === 'node') {
|
|
763
|
+
return true;
|
|
764
|
+
}
|
|
765
|
+
else if (forceEnvironment === 'browser') {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
try {
|
|
769
|
+
return (Object.prototype.toString.call(global.process) === '[object process]');
|
|
770
|
+
}
|
|
771
|
+
catch (e) {
|
|
772
|
+
return false;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
/**
|
|
776
|
+
* Detect Browser Environment
|
|
777
|
+
*/
|
|
778
|
+
function isBrowser() {
|
|
779
|
+
return typeof self === 'object' && self.self === self;
|
|
780
|
+
}
|
|
781
|
+
function isBrowserExtension() {
|
|
782
|
+
var runtime = typeof chrome === 'object'
|
|
783
|
+
? chrome.runtime
|
|
784
|
+
: typeof browser === 'object'
|
|
785
|
+
? browser.runtime
|
|
786
|
+
: undefined;
|
|
787
|
+
return typeof runtime === 'object' && runtime.id !== undefined;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Detect React Native.
|
|
791
|
+
*
|
|
792
|
+
* @return true if ReactNative environment is detected.
|
|
793
|
+
*/
|
|
794
|
+
function isReactNative() {
|
|
795
|
+
return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');
|
|
796
|
+
}
|
|
797
|
+
/** Detects Electron apps. */
|
|
798
|
+
function isElectron() {
|
|
799
|
+
return getUA().indexOf('Electron/') >= 0;
|
|
800
|
+
}
|
|
801
|
+
/** Detects Internet Explorer. */
|
|
802
|
+
function isIE() {
|
|
803
|
+
var ua = getUA();
|
|
804
|
+
return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;
|
|
805
|
+
}
|
|
806
|
+
/** Detects Universal Windows Platform apps. */
|
|
807
|
+
function isUWP() {
|
|
808
|
+
return getUA().indexOf('MSAppHost/') >= 0;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Detect whether the current SDK build is the Node version.
|
|
812
|
+
*
|
|
813
|
+
* @return true if it's the Node SDK build.
|
|
814
|
+
*/
|
|
815
|
+
function isNodeSdk() {
|
|
816
|
+
return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;
|
|
817
|
+
}
|
|
818
|
+
/** Returns true if we are running in Safari. */
|
|
819
|
+
function isSafari() {
|
|
820
|
+
return (!isNode() &&
|
|
821
|
+
navigator.userAgent.includes('Safari') &&
|
|
822
|
+
!navigator.userAgent.includes('Chrome'));
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* This method checks if indexedDB is supported by current browser/service worker context
|
|
826
|
+
* @return true if indexedDB is supported by current browser/service worker context
|
|
827
|
+
*/
|
|
828
|
+
function isIndexedDBAvailable() {
|
|
829
|
+
try {
|
|
830
|
+
return typeof indexedDB === 'object';
|
|
831
|
+
}
|
|
832
|
+
catch (e) {
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject
|
|
838
|
+
* if errors occur during the database open operation.
|
|
839
|
+
*
|
|
840
|
+
* @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox
|
|
841
|
+
* private browsing)
|
|
842
|
+
*/
|
|
843
|
+
function validateIndexedDBOpenable() {
|
|
844
|
+
return new Promise(function (resolve, reject) {
|
|
845
|
+
try {
|
|
846
|
+
var preExist_1 = true;
|
|
847
|
+
var DB_CHECK_NAME_1 = 'validate-browser-context-for-indexeddb-analytics-module';
|
|
848
|
+
var request_1 = self.indexedDB.open(DB_CHECK_NAME_1);
|
|
849
|
+
request_1.onsuccess = function () {
|
|
850
|
+
request_1.result.close();
|
|
851
|
+
// delete database only when it doesn't pre-exist
|
|
852
|
+
if (!preExist_1) {
|
|
853
|
+
self.indexedDB.deleteDatabase(DB_CHECK_NAME_1);
|
|
854
|
+
}
|
|
855
|
+
resolve(true);
|
|
856
|
+
};
|
|
857
|
+
request_1.onupgradeneeded = function () {
|
|
858
|
+
preExist_1 = false;
|
|
859
|
+
};
|
|
860
|
+
request_1.onerror = function () {
|
|
861
|
+
var _a;
|
|
862
|
+
reject(((_a = request_1.error) === null || _a === void 0 ? void 0 : _a.message) || '');
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
catch (error) {
|
|
866
|
+
reject(error);
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
*
|
|
872
|
+
* This method checks whether cookie is enabled within current browser
|
|
873
|
+
* @return true if cookie is enabled within current browser
|
|
874
|
+
*/
|
|
875
|
+
function areCookiesEnabled() {
|
|
876
|
+
if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
|
|
847
882
|
/**
|
|
848
883
|
* @license
|
|
849
884
|
* Copyright 2017 Google LLC
|
|
@@ -899,11 +934,11 @@ var ErrorFactory = /** @class */ (function () {
|
|
|
899
934
|
data[_i - 1] = arguments[_i];
|
|
900
935
|
}
|
|
901
936
|
var customData = data[0] || {};
|
|
902
|
-
var fullCode = this.service
|
|
937
|
+
var fullCode = "".concat(this.service, "/").concat(code);
|
|
903
938
|
var template = this.errors[code];
|
|
904
939
|
var message = template ? replaceTemplate(template, customData) : 'Error';
|
|
905
940
|
// Service Name: Error message (service/code).
|
|
906
|
-
var fullMessage = this.serviceName
|
|
941
|
+
var fullMessage = "".concat(this.serviceName, ": ").concat(message, " (").concat(fullCode, ").");
|
|
907
942
|
var error = new FirebaseError(fullCode, fullMessage, customData);
|
|
908
943
|
return error;
|
|
909
944
|
};
|
|
@@ -912,7 +947,7 @@ var ErrorFactory = /** @class */ (function () {
|
|
|
912
947
|
function replaceTemplate(template, data) {
|
|
913
948
|
return template.replace(PATTERN, function (_, key) {
|
|
914
949
|
var value = data[key];
|
|
915
|
-
return value != null ? String(value) : "<"
|
|
950
|
+
return value != null ? String(value) : "<".concat(key, "?>");
|
|
916
951
|
});
|
|
917
952
|
}
|
|
918
953
|
var PATTERN = /\{\$([^}]+)}/g;
|
|
@@ -1769,7 +1804,7 @@ var validateArgCount = function (fnName, minCount, maxCount, argCount) {
|
|
|
1769
1804
|
* @return The prefix to add to the error thrown for validation.
|
|
1770
1805
|
*/
|
|
1771
1806
|
function errorPrefix(fnName, argName) {
|
|
1772
|
-
return fnName
|
|
1807
|
+
return "".concat(fnName, " failed: ").concat(argName, " argument ");
|
|
1773
1808
|
}
|
|
1774
1809
|
/**
|
|
1775
1810
|
* @param fnName
|
|
@@ -2011,7 +2046,7 @@ function calculateBackoffMillis(backoffCount, intervalMillis, backoffFactor) {
|
|
|
2011
2046
|
*/
|
|
2012
2047
|
function ordinal(i) {
|
|
2013
2048
|
if (!Number.isFinite(i)) {
|
|
2014
|
-
return ""
|
|
2049
|
+
return "".concat(i);
|
|
2015
2050
|
}
|
|
2016
2051
|
return i + indicator(i);
|
|
2017
2052
|
}
|
|
@@ -2059,5 +2094,5 @@ function getModularInstance(service) {
|
|
|
2059
2094
|
}
|
|
2060
2095
|
}
|
|
2061
2096
|
|
|
2062
|
-
export { CONSTANTS, 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, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
|
|
2097
|
+
export { CONSTANTS, 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, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
|
|
2063
2098
|
//# sourceMappingURL=index.esm5.js.map
|