src/lib/collections/equality-comparer.js
function (value) {
        if (value === null || value === undefined || value === defaultEqualityComparer) {
            return defaultEqualityComparer;
        }

        else if (value instanceof EqualityComparer) {
            return value;
        }

        else if (isFunction(value.hash) && isFunction(value.equals)) {
            return new EqualityComparer(value.hash, value.equals);
        }

        return defaultEqualityComparer;
    }
function (value) {
        if (value === null || value === undefined || value === defaultEqualityComparer) {
            return defaultEqualityComparer;
        }

        else if (value instanceof EqualityComparer) {
            return value;
        }

        else if (isFunction(value.hash) && isFunction(value.equals)) {
            return new EqualityComparer(value.hash, value.equals);
        }

        return defaultEqualityComparer;
    }
function ( value ) { if ( value === null || value === undefined || value === defaultEqualityComparer ) { return defaultEqualityComparer ; } else if ( value instanceof EqualityComparer ) { return value ; } else if ( isFunction ( value . hash ) && isFunction ( value . equals ) ) { return new EqualityComparer ( value . hash , value . equals ) ; } return defaultEqualityComparer ; }
Gets or creates a new EqualityComparer object.
@param {EqualityComparer|Object} value An EqualityComparer object.
@returns {EqualityComparer}
Gets or creates a new EqualityComparer object .