@firebase/util 1.9.1 → 1.9.2-canary.36558bd2e

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.
@@ -1,4 +1,4 @@
1
- import { __assign, __extends } from 'tslib';
1
+ import { __extends, __assign } from 'tslib';
2
2
 
3
3
  /**
4
4
  * @license
@@ -302,7 +302,7 @@ var base64 = {
302
302
  var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
303
303
  ++i;
304
304
  if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
305
- throw Error();
305
+ throw new DecodeBase64StringError();
306
306
  }
307
307
  var outByte1 = (byte1 << 2) | (byte2 >> 4);
308
308
  output.push(outByte1);
@@ -343,6 +343,18 @@ var base64 = {
343
343
  }
344
344
  }
345
345
  };
346
+ /**
347
+ * An error encountered while decoding base64 string.
348
+ */
349
+ var DecodeBase64StringError = /** @class */ (function (_super) {
350
+ __extends(DecodeBase64StringError, _super);
351
+ function DecodeBase64StringError() {
352
+ var _this = _super !== null && _super.apply(this, arguments) || this;
353
+ _this.name = 'DecodeBase64StringError';
354
+ return _this;
355
+ }
356
+ return DecodeBase64StringError;
357
+ }(Error));
346
358
  /**
347
359
  * URL-safe base64 encoding
348
360
  */
@@ -2094,5 +2106,5 @@ function getModularInstance(service) {
2094
2106
  }
2095
2107
  }
2096
2108
 
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 };
2109
+ 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, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };
2098
2110
  //# sourceMappingURL=index.esm5.js.map