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

refactoring: remove Array.forEach used in place of Array.some/find #204

Merged
merged 1 commit into from Oct 9, 2019

Conversation

mleguen
Copy link
Member

@mleguen mleguen commented Oct 2, 2019

Follow up of #202 (comment)

Replacing Array.forEach in checkAllAliases was not that straightforward, as this function was not really used for what its comment said it was, so I had to use Array.find instead of Array.some.

So I fixed the comment too.

@bcoe
Copy link
Member

bcoe commented Oct 7, 2019

@mleguen mind rebasing? this looks like a smart refactor.

@mleguen
Copy link
Member Author

mleguen commented Oct 7, 2019

Sure. Added to next wednesday's TODO.

No need to parse all the array when a single match is expected.
@bcoe bcoe merged commit afcaecb into yargs:master Oct 9, 2019
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.

None yet

2 participants