Fixes #193: Allowing plug overrides

This commit is contained in:
Zef Hemel
2023-08-20 19:54:31 +02:00
parent 136682ebd3
commit 2a10d50094
9 changed files with 146 additions and 40 deletions
-36
View File
@@ -72,39 +72,3 @@ Loading some onboarding content for you (but doing so does require a working int
return parseYamlSettings(settingsText);
}
// Compares two objects deeply
export function deepEqual(a: any, b: any): boolean {
if (a === b) {
return true;
}
if (typeof a !== typeof b) {
return false;
}
if (typeof a === "object") {
if (Array.isArray(a) && Array.isArray(b)) {
if (a.length !== b.length) {
return false;
}
for (let i = 0; i < a.length; i++) {
if (!deepEqual(a[i], b[i])) {
return false;
}
}
return true;
} else {
const aKeys = Object.keys(a);
const bKeys = Object.keys(b);
if (aKeys.length !== bKeys.length) {
return false;
}
for (const key of aKeys) {
if (!deepEqual(a[key], b[key])) {
return false;
}
}
return true;
}
}
return false;
}