*Update dist

This commit is contained in:
Derrick Hammer 2022-12-22 09:45:05 -05:00
parent 9e8e44b9c5
commit e1d4785240
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 0 additions and 12 deletions

12
dist/index.js vendored
View File

@ -64,17 +64,6 @@ class Config {
const settings = (0, deep_to_flat_object_1.default)(json); const settings = (0, deep_to_flat_object_1.default)(json);
for (const key of Object.keys(settings)) { for (const key of Object.keys(settings)) {
const value = settings[key]; const value = settings[key];
let keyPath = key.split(".");
let isArray = key.includes(".") &&
keyPath.length > 1 &&
typeof parseInt(keyPath.pop()) === "number";
if (isArray) {
let itemPath = keyPath.join(".");
let item = this.get(itemPath, []);
item.push(value);
this.set(itemPath, item);
continue;
}
this.set(key, value); this.set(key, value);
} }
} }
@ -99,7 +88,6 @@ class Config {
} }
key = this.normalize(key); key = this.normalize(key);
object_path_1.default.set(this.data, key, value); object_path_1.default.set(this.data, key, value);
this.data[key] = value;
} }
has(key) { has(key) {
(0, bsert_1.default)(typeof key === "string", "Key must be a string."); (0, bsert_1.default)(typeof key === "string", "Key must be a string.");