Skip to content

Instantly share code, notes, and snippets.

@saikat
Created Apr 27, 2010
Embed
What would you like to do?
if (!Object.keys) {
Object.keys = function( obj ) {
var array = new Array();
for ( var prop in obj ) {
if ( obj.hasOwnProperty( prop ) ) {
array.push( prop );
}
}
return array;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment