enumerable
enumerable copied to clipboard
count(): simply return total number of items if no function supplied.
As far as I can tell, there's no way to access the length of the enumerable's data via the enumerable interface without invoking __iterator__.length, or doing .count(function(){return true}). This grants access to the length via calling count() without a function argument, e.g.
var arr = Enumerable([1,2,3,4,5]);
arr.count().should.equal(5);
Possible should also add a length() method or something.
+1 for .length()
this needs a rebase apparently