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

Prefer for of #106

Merged
merged 4 commits into from
May 2, 2020
Merged

Prefer for of #106

merged 4 commits into from
May 2, 2020

Conversation

brettz9
Copy link
Contributor

@brettz9 brettz9 commented May 1, 2020

Builds on #103

esquery.js Outdated
@@ -55,8 +55,8 @@ function inPath(node, ancestor, path) {
const field = ancestor[path[0]];
const remainingPath = path.slice(1);
if (Array.isArray(field)) {
for (let i = 0, l = field.length; i < l; ++i) {
if (inPath(node, field[i], remainingPath)) { return true; }
for (const fld of field) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a great variable name. component?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, SGTM. Added.

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise.

@michaelficarra michaelficarra merged commit b48c76b into estools:master May 2, 2020
@brettz9 brettz9 deleted the prefer-for-of branch May 2, 2020 23:15
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