Current implementation of _.isEmpty() always returns true for date objects. Should this be the case?
for example, _.isEmpty(new Date("2/2/2012")) returns true.
isEmpty is a function that works on Objects and Arrays -- behavior on other types of natives is undefined.
@jashkenas
isEmptyis a function that works on Objects and Arrays -- behavior on other types of natives is undefined.
Based on the code _.isEmpty() also works on strings. The documentation should probably be updated.
@fragnemesis
The result of new Date('2/2/2012') is an object ;D
It just doesn't have any enumerable _own properties_ which is why _.isEmpty(...) correctly returns true.