@firebase/util 1.6.1 → 1.6.2-canary.b60cf76e1

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Copied from https://stackoverflow.com/a/2117523
19
+ * Generates a new uuid.
20
+ * @public
21
+ */
22
+ export declare const uuidv4: () => string;
@@ -347,7 +347,7 @@ export declare type ErrorFn = (error: Error) => void;
347
347
  *
348
348
  * catch (e) {
349
349
  * assert(e.message === "Could not find file: foo.txt.");
350
- * if (e.code === 'service/file-not-found') {
350
+ * if ((e as FirebaseError)?.code === 'service/file-not-found') {
351
351
  * console.log("Could not read file: " + e['file']);
352
352
  * }
353
353
  * }
@@ -805,6 +805,13 @@ export declare interface Subscribe<T> {
805
805
 
806
806
  export declare type Unsubscribe = () => void;
807
807
 
808
+ /**
809
+ * Copied from https://stackoverflow.com/a/2117523
810
+ * Generates a new uuid.
811
+ * @public
812
+ */
813
+ export declare const uuidv4: () => string;
814
+
808
815
  /**
809
816
  * Check to make sure the appropriate number of arguments are provided for a public function.
810
817
  * Throws an error if it fails.
package/dist/util.d.ts CHANGED
@@ -347,7 +347,7 @@ export declare type ErrorFn = (error: Error) => void;
347
347
  *
348
348
  * catch (e) {
349
349
  * assert(e.message === "Could not find file: foo.txt.");
350
- * if (e.code === 'service/file-not-found') {
350
+ * if ((e as FirebaseError)?.code === 'service/file-not-found') {
351
351
  * console.log("Could not read file: " + e['file']);
352
352
  * }
353
353
  * }
@@ -805,6 +805,13 @@ export declare interface Subscribe<T> {
805
805
 
806
806
  export declare type Unsubscribe = () => void;
807
807
 
808
+ /**
809
+ * Copied from https://stackoverflow.com/a/2117523
810
+ * Generates a new uuid.
811
+ * @public
812
+ */
813
+ export declare const uuidv4: () => string;
814
+
808
815
  /**
809
816
  * Check to make sure the appropriate number of arguments are provided for a public function.
810
817
  * Throws an error if it fails.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/util",
3
- "version": "1.6.1",
3
+ "version": "1.6.2-canary.b60cf76e1",
4
4
  "description": "",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.node.cjs.js",