@elliemae/pui-app-sdk 5.21.0 → 5.21.1
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.
|
@@ -34,12 +34,12 @@ __export(config_exports, {
|
|
|
34
34
|
setAppConfigValue: () => setAppConfigValue
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(config_exports);
|
|
37
|
-
var import_lodash =
|
|
37
|
+
var import_lodash = require("lodash");
|
|
38
38
|
var import_app_config = __toESM(require("../../app.config.json"));
|
|
39
39
|
let gAppConfig = import_app_config.default;
|
|
40
40
|
const setAppConfig = (config) => {
|
|
41
41
|
gAppConfig = config;
|
|
42
42
|
};
|
|
43
|
-
const getAppConfigValue = (key = "", defaultValue = null) => import_lodash.
|
|
44
|
-
const setAppConfigValue = (key, value) => import_lodash.
|
|
45
|
-
const hasItem = (key = "") => import_lodash.
|
|
43
|
+
const getAppConfigValue = (key = "", defaultValue = null) => (0, import_lodash.clone)((0, import_lodash.get)(gAppConfig, key, defaultValue));
|
|
44
|
+
const setAppConfigValue = (key, value) => (0, import_lodash.set)(gAppConfig, key, value);
|
|
45
|
+
const hasItem = (key = "") => (0, import_lodash.has)(gAppConfig, key);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { get, set, clone, has } from "lodash";
|
|
2
2
|
import appConfig from "../../app.config.json";
|
|
3
3
|
let gAppConfig = appConfig;
|
|
4
4
|
const setAppConfig = (config) => {
|
|
5
5
|
gAppConfig = config;
|
|
6
6
|
};
|
|
7
|
-
const getAppConfigValue = (key = "", defaultValue = null) =>
|
|
8
|
-
const setAppConfigValue = (key, value) =>
|
|
9
|
-
const hasItem = (key = "") =>
|
|
7
|
+
const getAppConfigValue = (key = "", defaultValue = null) => clone(get(gAppConfig, key, defaultValue));
|
|
8
|
+
const setAppConfigValue = (key, value) => set(gAppConfig, key, value);
|
|
9
|
+
const hasItem = (key = "") => has(gAppConfig, key);
|
|
10
10
|
export {
|
|
11
11
|
getAppConfigValue,
|
|
12
12
|
hasItem,
|