Revert "Adding _.count to count truthy values in an iterator. _.count([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }) = 3"

This reverts commit c8e3c04076.

Conflicts:

	underscore.js
This commit is contained in:
Samuel Clay
2011-04-06 09:03:40 -04:00
parent 5457522582
commit 1fc7d4b049
3 changed files with 6 additions and 34 deletions

View File

@@ -122,13 +122,6 @@ $(document).ready(function() {
equals(odds.join(', '), '1, 3, 5', 'rejected each even number');
});
test('collections: count', function() {
var count = _.count([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
equals(count, 3, 'counted even numbers');
var count = _.count([0, 1, 2, 3, 4, 5, 6]);
equals(count, 6, 'counted all truthy numbers');
});
test('collections: all', function() {
ok(_.all([]), 'the empty set');
ok(_.all([true, true, true]), 'all true values');