Skip to content

Instantly share code, notes, and snippets.

@polotek
Created August 15, 2010 16:58
Show Gist options
  • Save polotek/525692 to your computer and use it in GitHub Desktop.
Save polotek/525692 to your computer and use it in GitHub Desktop.
Object.getAllPropertyNames = function(obj) {
var keys = [];
while(obj && obj !== Object) {
keys = keys.concat(Object.getOwnPropertyNames(obj));
obj = Object.getPrototypeOf(obj);
}
return keys;
}
@c4milo
Copy link

c4milo commented Aug 15, 2010

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment