12 lines
443 B
JavaScript
12 lines
443 B
JavaScript
export const hoc = (option, componentList) => componentList[option];
|
|
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]
|
|
)
|
|
);
|
|
};
|