client/splunk.ui.charting.js
function(obj1, obj2){
                if(obj1 instanceof Array && obj2 instanceof Array){
                        if(obj1.length!==obj2.length){
                           return false;
                        }else{
                            for(var i=0; i<obj1.length; i++){
                                if(!this.objectSimilarity(obj1[i], obj2[i])){
                                    return false;
                                }
                            }
                        }
                }else if(obj1 instanceof Object && obj2 instanceof Object){
                    if(obj1!=obj2){
                        for(var j in obj2){
                            if(!obj1.hasOwnProperty(j)){
                                return false;
                            }
                        }
                        for(var k in obj1){
                            if(obj1.hasOwnProperty(k)){
                                if(obj2.hasOwnProperty(k)){
                                    if(!this.objectSimilarity(obj1[k], obj2[k])){
                                        return false;
                                    }
                                }else{
                                    return false;
                                }
                            }
                        }
                    }
                }else if(typeof(obj1)==="function" && typeof(obj2)==="function"){
                    if(obj1.toString()!==obj2.toString()){
                        return false;
                    }
                }else if(obj1!==obj2){
                    return false;
                }
                return true;
        }
function(obj1, obj2){
                if(obj1 instanceof Array && obj2 instanceof Array){
                        if(obj1.length!==obj2.length){
                           return false;
                        }else{
                            for(var i=0; i<obj1.length; i++){
                                if(!this.objectSimilarity(obj1[i], obj2[i])){
                                    return false;
                                }
                            }
                        }
                }else if(obj1 instanceof Object && obj2 instanceof Object){
                    if(obj1!=obj2){
                        for(var j in obj2){
                            if(!obj1.hasOwnProperty(j)){
                                return false;
                            }
                        }
                        for(var k in obj1){
                            if(obj1.hasOwnProperty(k)){
                                if(obj2.hasOwnProperty(k)){
                                    if(!this.objectSimilarity(obj1[k], obj2[k])){
                                        return false;
                                    }
                                }else{
                                    return false;
                                }
                            }
                        }
                    }
                }else if(typeof(obj1)==="function" && typeof(obj2)==="function"){
                    if(obj1.toString()!==obj2.toString()){
                        return false;
                    }
                }else if(obj1!==obj2){
                    return false;
                }
                return true;
        }
function ( obj1 , obj2 ) { if ( obj1 instanceof Array && obj2 instanceof Array ) { if ( obj1 . length !== obj2 . length ) { return false ; } else { for ( var i = 0 ; i < obj1 . length ; i ++ ) { if ( ! this . objectSimilarity ( obj1 [ i ] , obj2 [ i ] ) ) { return false ; } } } } else if ( obj1 instanceof Object && obj2 instanceof Object ) { if ( obj1 != obj2 ) { for ( var j in obj2 ) { if ( ! obj1 . hasOwnProperty ( j ) ) { return false ; } } for ( var k in obj1 ) { if ( obj1 . hasOwnProperty ( k ) ) { if ( obj2 . hasOwnProperty ( k ) ) { if ( ! this . objectSimilarity ( obj1 [ k ] , obj2 [ k ] ) ) { return false ; } } else { return false ; } } } } } else if ( typeof ( obj1 ) === "function" && typeof ( obj2 ) === "function" ) { if ( obj1 . toString ( ) !== obj2 . toString ( ) ) { return false ; } } else if ( obj1 !== obj2 ) { return false ; } return true ; }
Compare the likeness of two objects. Please use with discretion.
Compare the likeness of two objects . Please use with discretion .