proYang / outils

:rocket: 前端业务代码工具库
https://www.npmjs.com/package/outils
MIT License
2.61k stars 591 forks source link

Update isEmptyObject.js #8

Closed NaturelLee closed 6 years ago

NaturelLee commented 6 years ago

!!Object.keys(obj).length

proYang commented 6 years ago

这个改动有问题,当对象为空的时候isEmptyObject函数返回true,表明这是个空对象。

!Object.keys( { } ).length === true