Files
twenty/server/src/utils/equal.ts
martmull ba69435339 0.2.0 cleaning script (#2342)
* Display maxUpdatedAt for each workspace Schema

* Factorize functions

* Add max update for public workspaces

* Merge everything in a single json

* Enrich results

* Get from proper table

* Update

* Move to proper command file

* Add a dry-run option

* Remove workspaces from database

* Fix DeleteWorkspace method

* Add new option

* Remove proper data when deleting workspace

* Minor improvements
2023-11-06 23:15:02 +01:00

14 lines
393 B
TypeScript

//https://stackoverflow.com/questions/27030/comparing-arrays-of-objects-in-javascript
export const objectsEqual = (o1, o2) => {
return (
Object.keys(o1).length === Object.keys(o2).length &&
Object.keys(o1).every((p) => o1[p] === o2[p])
);
};
export const arraysEqual = (a1, a2) => {
return (
a1.length === a2.length && a1.every((o, idx) => objectsEqual(o, a2[idx]))
);
};