documentcloud/underscore — pull request #690 by marioizquierdo (2012-07-31 19:24:35+00:00)
Title: isEmpty check for lenght === 0 in any object with lenght property

Apply some duck typing ruby-style checks, and now isEmpty behavior is more intuitive.

Now you can do things like this (that is not true with the current implementation):

matched_elements = jQuery(selector);
if (!_.isEmpty(matched_elements)) {
do_stuff();
}

In general, makes sense to think that anything with length === 0 is empty.