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