Skip to content

Instantly share code, notes, and snippets.

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 sylvainpolletvillard/f231b9c8bca015cb2a2ef6b5e6cb1953 to your computer and use it in GitHub Desktop.
Save sylvainpolletvillard/f231b9c8bca015cb2a2ef6b5e6cb1953 to your computer and use it in GitHub Desktop.
function getAllPropertyNames(o){ return o ? Object.getOwnPropertyNames(o).concat(getAllPropertyNames(Object.getPrototypeOf(o))) : [] }
Object.prototype.getAllPropertyNames = function(){ return getAllPropertyNames(this) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment