0.2.0 cleaning script (#2379)

* Move question to questions folder

* Aggregate update result functions

* Use lodash to compare list of objects

* Remove favorites from tables

* Add a workspace parameter

* Move question after result log

* Improve logging

* Code review returns

* Add only lodash.isequal
This commit is contained in:
martmull
2023-11-07 11:10:14 +01:00
committed by GitHub
parent 183d6a1d1a
commit 462c7ebdc1
6 changed files with 69 additions and 49 deletions

View File

@ -1,13 +0,0 @@
//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]))
);
};