branching and very basic merging of slots
This commit is contained in:
parent
614e6c0fdb
commit
3978f7f835
32 changed files with 684 additions and 420 deletions
14
util/util.js
14
util/util.js
|
|
@ -12,6 +12,20 @@ export function deepEqual(a, b) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (a instanceof Set) {
|
||||
if (!(b instanceof Set)) {
|
||||
return false;
|
||||
}
|
||||
if (a.size !== b.size) {
|
||||
return false;
|
||||
}
|
||||
for (const entry of a) {
|
||||
if (!b.has(entry)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
const keysA = Object.keys(a);
|
||||
const keysB = Object.keys(b);
|
||||
if (keysA.length !== keysB.length) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue