Skip to content

Instantly share code, notes, and snippets.

@liammclennan
Created June 8, 2011 10:12
Show Gist options
  • Select an option

  • Save liammclennan/1014150 to your computer and use it in GitHub Desktop.

Select an option

Save liammclennan/1014150 to your computer and use it in GitHub Desktop.
JavaScript Property Inspection
Object.prototype._properties = function() {
var properties = [];
for (p in this) {
if (typeof this[p] !== 'function') {
properties.push(p + "=" + this[p]);
}
}
return properties;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment