/**
 *
 * @param {Object} a
 * @param {Object} b
 * @returns {boolean}
 */
export function objectsEqual(a, b) {
    return a === b
        || (
            typeof a === "object" //guard against null and undefined values
            && typeof a.equals === "function" // check for equals method
            && a.equals(b)
        );
}