SyntaxFix
Write A Post
Hire A Developer
Questions
How about using JSON.stringify? It is almost available in all modern browsers.
function isEmptyObject(obj){ return JSON.stringify(obj) === '{}'; }