src/utils.js
function deepEquals(obj1, obj2) {
    if (typeof obj1 !== typeof obj2) {
        return false;
    }

    // NaN check
    if (obj1 !== obj1) {
        return obj2 !== obj2;
    }

    // Non-object types will compare correctly with ===
    if (typeof obj1 !== "object") {
        return obj1 === obj2;
    }

    if (!_checkKeysFromFirstAreInSecond(obj1, obj2)) {
        return false;
    }

    if (!_checkKeysFromFirstAreInSecond(obj2, obj1)) {
        return false;
    }

    return true;
}
function deepEquals(obj1, obj2) {
    if (typeof obj1 !== typeof obj2) {
        return false;
    }

    // NaN check
    if (obj1 !== obj1) {
        return obj2 !== obj2;
    }

    // Non-object types will compare correctly with ===
    if (typeof obj1 !== "object") {
        return obj1 === obj2;
    }

    if (!_checkKeysFromFirstAreInSecond(obj1, obj2)) {
        return false;
    }

    if (!_checkKeysFromFirstAreInSecond(obj2, obj1)) {
        return false;
    }

    return true;
}
function deepEquals ( obj1 , obj2 ) { if ( typeof obj1 !== typeof obj2 ) { return false ; } // NaN check if ( obj1 !== obj1 ) { return obj2 !== obj2 ; } // Non-object types will compare correctly with === if ( typeof obj1 !== "object" ) { return obj1 === obj2 ; } if ( ! _checkKeysFromFirstAreInSecond ( obj1 , obj2 ) ) { return false ; } if ( ! _checkKeysFromFirstAreInSecond ( obj2 , obj1 ) ) { return false ; } return true ; }
Performs a deep check to see if the two values provided are equal. For
non-object types, this refers to simple equality; for object types, the
two objects must contain all of the same keys and have the same values behind
all of those keys.

THIS METHOD DOES NOT CHECK FOR CYCLES IN THE OBJECTS PROVIDED. Don't try to
use it with any objects that may have cycles or you'll likely find your thread
frozen forever.

@param {object} obj1 - The first object to check
@param {object} obj2 - The second object to check
@returns {boolean} True if the two values are equal and all of the values contained in them are also equal
Performs a deep check to see if the two values provided are equal . For non - object types this refers to simple equality ; for object types the two objects must contain all of the same keys and have the same values behind all of those keys .