@ -69,7 +69,9 @@ var utils = {
keys : function ( object ) {
keys : function ( object ) {
var result = [ ] ;
var result = [ ] ;
for ( var key in object ) {
for ( var key in object ) {
result . push ( key ) ;
if ( object . hasOwnProperty ( key ) ) {
result . push ( key ) ;
}
}
}
return result ;
return result ;
} ,
} ,
@ -77,7 +79,9 @@ var utils = {
values : function ( object ) {
values : function ( object ) {
var result = [ ] ;
var result = [ ] ;
for ( var key in object ) {
for ( var key in object ) {
result . push ( object [ key ] ) ;
if ( object . hasOwnProperty ( key ) ) {
result . push ( object [ key ] ) ;
}
}
}
return result ;
return result ;
} ,
} ,
@ -85,15 +89,19 @@ var utils = {
clone : function ( object ) {
clone : function ( object ) {
var result = { } ;
var result = { } ;
for ( var key in object ) {
for ( var key in object ) {
result [ key ] = object [ key ] ;
if ( object . hasOwnProperty ( key ) ) {
result [ key ] = object [ key ] ;
}
}
}
return result ;
return result ;
} ,
} ,
defaults : function ( object , defaults ) {
defaults : function ( object , defaults ) {
for ( var key in defaults ) {
for ( var key in defaults ) {
if ( ! ( key in object ) ) {
if ( defaults . hasOwnProperty ( key ) ) {
object [ key ] = defaults [ key ] ;
if ( ! ( key in object ) ) {
object [ key ] = defaults [ key ] ;
}
}
}
}
}
} ,
} ,