12 lines
451 B
JavaScript
12 lines
451 B
JavaScript
|
|
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]
|
||
|
|
)
|
||
|
|
);
|
||
|
|
};
|