17 lines
200 B
JavaScript
17 lines
200 B
JavaScript
|
|
|
|
var objectKeys = function( object ) {
|
|
var i,
|
|
result = [];
|
|
|
|
if ( Object.keys ) {
|
|
return Object.keys( object );
|
|
}
|
|
|
|
for ( i in object ) {
|
|
result.push( i );
|
|
}
|
|
|
|
return result;
|
|
};
|
|
|