Skip to content

Instantly share code, notes, and snippets.

@m1el
Created June 11, 2013 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m1el/5757523 to your computer and use it in GitHub Desktop.
Save m1el/5757523 to your computer and use it in GitHub Desktop.
if (!Object.keys) {
Object.keys = function(obj) {
var keys = [];
for (var k in obj) {
if (obj.hasOwnProperty(k)){
keys.push(k);
}
}
return keys;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment