zwischenstand

This commit is contained in:
2025-07-04 12:22:41 +02:00
parent 3c954ac715
commit b7c330a2b5
25 changed files with 453 additions and 219 deletions

View File

@ -343,3 +343,20 @@ const deleteKeyValueAsync = async (id: string) => {
.delete(haexPasswordsItemKeyValues)
.where(eq(haexPasswordsItemKeyValues.id, id))
}
const areItemsEqual = (
groupA: unknown | unknown[] | null,
groupB: unknown | unknown[] | null,
) => {
if (groupA === null && groupB === null) return true
if (Array.isArray(groupA) && Array.isArray(groupB)) {
console.log('compare object arrays', groupA, groupB)
if (groupA.length === groupB.length) return true
return groupA.some((group, index) => {
return areObjectsEqual(group, groupA[index])
})
}
return areObjectsEqual(groupA, groupB)
}