Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply boiler to some and every; simplify each #1710

Merged
merged 2 commits into from
Jun 28, 2014

Conversation

megawac
Copy link
Collaborator

@megawac megawac commented Jun 28, 2014

Similar to #1708. Still not sure if I like this pattern, but it definitely has some benefits.

post-some: http://jsperf.com/pr-1689/8
post-each: http://jsperf.com/pr-1689/11

michaelficarra added a commit that referenced this pull request Jun 28, 2014
Apply boiler to some and every; simplify each
@michaelficarra michaelficarra merged commit 834c80e into jashkenas:master Jun 28, 2014
@megawac megawac deleted the quick-check branch June 28, 2014 16:14
@jashkenas
Copy link
Owner

for (; i < length; i++) {

Can we avoid doing things like this, and just put the index = 0 in there instead?

@michaelficarra
Copy link
Collaborator

@jashkenas: To be fair, this was a pattern that already existed twice before this PR. Fix incoming.

michaelficarra added a commit that referenced this pull request Jun 30, 2014
#1710 (comment)

The one exception is `_.indexOf` where that pattern is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants