判断对象是否为空

var obj = {};
JSON.stringify(obj) == "{}"   // true

就这样。

原文地址:https://www.cnblogs.com/luguankun/p/11795549.html