| 65 | } |
| 66 | |
| 67 | export function entriesEquals(left, right) { |
| 68 | if (left == right) return true; |
| 69 | if (left == undefined) return right == undefined; |
| 70 | const leftEntries = Object.entries(left); |
| 71 | const rightEntries = Object.entries(right); |
| 72 | if (leftEntries.length !== rightEntries.length) return false; |
| 73 | for (let i = 0; i < leftEntries.length; i++) { |
| 74 | const l = leftEntries[i]; |
| 75 | const r = rightEntries[i]; |
| 76 | if (l[0] != r[0]) return false; |
| 77 | if (l[1] != r[1]) return false; |
| 78 | } |
| 79 | return true; |
| 80 | } |
| 81 | |
| 82 | export function keysEquals(left, right) { |
| 83 | if (left == right) return true; |