Fix for #478 - any and every should be consistent about casting result to boolean

This commit is contained in:
Derek Brans
2012-02-16 16:31:18 -05:00
parent bb63be5167
commit c2a58725be

View File

@@ -180,7 +180,7 @@
each(obj, function(value, index, list) {
if (!(result = result && iterator.call(context, value, index, list))) return breaker;
});
return result;
return !!result;
};
// Determine if at least one element in the object matches a truth test.