Files
old-web/frontend-react/src/utils/helpers.js

12 lines
451 B
JavaScript
Raw Normal View History

export const hoc = (option, componentList) => componentList[option] || null;
export const areObjectEqual = function checkEquality(objectA, objectB) {
return (
Object.keys(objectA).length === Object.keys(objectB).length &&
Object.keys(objectA).every(property =>
objectA[property] === Object(objectA[property])
? checkEquality(objectA[property], objectB[property])
: objectA[property] === objectB[property]
)
);
};