Skip to content

Conversation

@timoxley
Copy link
Member

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);

@timoxley
Copy link
Member Author

Possible should also add a length() method or something.

@tj
Copy link
Member

tj commented Dec 17, 2012

+1 for .length()

@tj
Copy link
Member

tj commented Dec 17, 2012

this needs a rebase apparently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants