判断对象为空

1、序列化

JSON.stringfy(obj)=='{}'

2、遍历键

Object.keys(obj).length==0

 

posted @ 2020-05-21 09:45  Jennyishere  阅读(166)  评论(0)    收藏  举报