I have this object: {"": undefined}
{"": undefined}
and when I check this object for empty in this way: _.isEmpty({"": undefined})
_.isEmpty({"": undefined})
I get false result, maybe in lodash we have another method?
false
_.isEmpty(obj, true)
var obj = { 'firstName': undefined , 'lastName' : undefined }; console.log(_.isEmpty(obj)); // false console.log(_.isEmpty({})); // true
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script>
1.4m articles
1.4m replys
5 comments
57.0k users