proYang / outils

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

Update isEmptyObject.js #8

Closed NaturelLee closed 7 years ago

NaturelLee commented 7 years ago

!!Object.keys(obj).length

proYang commented 7 years ago

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

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