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>
2.1m questions
2.1m answers
60 comments
57.0k users