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

refactor: prefer includes over indexOf #1305

Closed

Conversation

jamesgeorge007
Copy link

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
Use includes() over indexOf() to check for existence.

@malept malept changed the title refactor: minor tweak refactor: prefer includes over indexOf Nov 27, 2019
@malept
Copy link
Member

malept commented Nov 27, 2019

If you're going to make minor refactors, can you replace all of the usages of indexOf that you can and run the testsuite to make sure it's not going to break anything?

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