Timo Tijhof 2013-07-25 04:39:30 +02:00 committed by Krinkle
parent faeb27c477
commit 01f9c702b4

View file

@ -1,12 +1,12 @@
/*!
* Object Oriented JavaScript Library v1.0.1
* Object Oriented JavaScript Library v1.0.2
* https://github.com/trevorparscal/oojs
*
* Copyright 2011-2013 OOJS Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: Thu Jun 06 2013 17:25:38 GMT+0200 (CEST)
* Date: Thu Jul 25 04:28:57 2013 GMT+0200 (CEST)
*/
( function ( global ) {
@ -94,10 +94,15 @@ oo.inheritClass = function ( targetFn, originFn ) {
var targetConstructor = targetFn.prototype.constructor;
targetFn.prototype = Object.create( originFn.prototype );
// Restore constructor property of targetFn
targetFn.prototype.constructor = targetConstructor;
targetFn.prototype = Object.create( originFn.prototype, {
// Restore constructor property of targetFn
constructor: {
value: targetConstructor,
enumerable: false,
writable: true,
configurable: true
}
} );
// Extend static properties - always initialize both sides
originFn.static = originFn.static || {};
@ -238,6 +243,11 @@ oo.getObjectValues = function ( obj ) {
*/
oo.compare = function ( a, b, asymmetrical ) {
var aValue, bValue, aType, bType, k;
if ( a === b ) {
return true;
}
for ( k in a ) {
aValue = a[k];
bValue = b[k];