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 to use array include #898

Closed
aciccarello opened this issue Nov 5, 2018 · 2 comments
Closed

Refactor to use array include #898

aciccarello opened this issue Nov 5, 2018 · 2 comments
Labels
good first issue Easier issue for first time contributors

Comments

@aciccarello
Copy link
Collaborator

Minor change to make the code more readable. Array.includes is available in Node 6+ and can be used to replace the less-readable [].indexOf !== -1 or [].indexOf > -1.

In general, Array.includes is a drop in replacement but there are some slight differences in edge cases (most notably when searching for undefined).

https://dev.to/adroitcoder/includes-vs-indexof-in-javascript

@aciccarello aciccarello added good first issue Easier issue for first time contributors code health labels Nov 5, 2018
@bendtherules
Copy link
Contributor

Hi,
I would like to take this up.

@aciccarello
Copy link
Collaborator Author

Great! Let me know if you have any questions about contributing. Gitter is also a good place for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easier issue for first time contributors
Projects
None yet
Development

No branches or pull requests

2 participants