Modified any/some test case to demonstrate issue #177

Fixed any/some formatting to be consistent with the rest of underscore.js
This commit is contained in:
shinuza
2011-05-20 09:13:58 +02:00
parent 5141a51298
commit 40af1652eb
2 changed files with 5 additions and 2 deletions

View File

@@ -186,10 +186,10 @@
if (obj == null) return result;
if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
each(obj, function (value, index, list) {
if (result |= iterator.call(context, value, index, list)) return breaker;
if (result |= iterator.call(context, value, index, list)) return breaker;
});
return !!result;
}
};
// Determine if a given value is included in the array or object using `===`.
// Aliased as `contains`.