universe-code 0.0.49 → 0.0.51
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,17 +1,7 @@
|
|
|
1
|
+
|
|
1
2
|
let config = null;
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
-
* Configure IndexedDB once at app startup
|
|
5
|
-
* @param {Object} options
|
|
6
|
-
* @param {string} options.DB_NAME
|
|
7
|
-
* @param {number} [options.DB_VERSION]
|
|
8
|
-
* @param {string} options.STORE_NAME
|
|
9
|
-
*/
|
|
10
4
|
export const configureIdb = (options) => {
|
|
11
|
-
if (!options || !options.DB_NAME || !options.STORE_NAME) {
|
|
12
|
-
throw new Error("configureIdb requires dbName and storeName");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
5
|
config = options;
|
|
16
6
|
};
|
|
17
7
|
|
|
@@ -21,6 +11,5 @@ export const getConfig = () => {
|
|
|
21
11
|
"IndexedDB not configured. Call configureIdb() before using the store."
|
|
22
12
|
);
|
|
23
13
|
}
|
|
24
|
-
|
|
25
14
|
return config;
|
|
26
15
|
};
|