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:
@ -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]))
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user