Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Object.prototype.isEmpty = function() {
var obj = this;
for (var key in obj) {
if (obj.hasOwnProperty(key)) return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment