modules/utils.js
function equals(v1, v2) {
    "use strict";
    if (isFunction(v1)) {
        return v1.toString() === v2.toString();
    }
    // with Gecko, instanceof is not enough to test object
    if (v1 instanceof Object || isObject(v1)) {
        if (!(v2 instanceof Object || isObject(v2)) ||
            Object.keys(v1).length !== Object.keys(v2).length) {
            return false;
        }
        for (var k in v1) {
            if (!equals(v1[k], v2[k])) {
                return false;
            }
        }
        return true;
    }
    return v1 === v2;
}
function equals(v1, v2) {
    "use strict";
    if (isFunction(v1)) {
        return v1.toString() === v2.toString();
    }
    // with Gecko, instanceof is not enough to test object
    if (v1 instanceof Object || isObject(v1)) {
        if (!(v2 instanceof Object || isObject(v2)) ||
            Object.keys(v1).length !== Object.keys(v2).length) {
            return false;
        }
        for (var k in v1) {
            if (!equals(v1[k], v2[k])) {
                return false;
            }
        }
        return true;
    }
    return v1 === v2;
}
function equals ( v1 , v2 ) { "use strict" ; if ( isFunction ( v1 ) ) { return v1 . toString ( ) === v2 . toString ( ) ; } // with Gecko, instanceof is not enough to test object if ( v1 instanceof Object || isObject ( v1 ) ) { if ( ! ( v2 instanceof Object || isObject ( v2 ) ) || Object . keys ( v1 ) . length !== Object . keys ( v2 ) . length ) { return false ; } for ( var k in v1 ) { if ( ! equals ( v1 [ k ] , v2 [ k ] ) ) { return false ; } } return true ; } return v1 === v2 ; }
Tests equality between the two passed arguments.

@param  Mixed  v1
@param  Mixed  v2
@param  Boolean
Tests equality between the two passed arguments .