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
isArray has unnecessary code #192
Comments
To convert to a boolean value. This was mentioned before and was actually PRed to fix the issue of the return value not always being boolean. |
But you don't need |
You need it to check if the array is empty or something like that. |
No, it is not needed. |
To add more context, the PR in question is #130 which fixes #111, i.e.
which was changed to
However, as @kirilloid just said, the first part of the expression is unneeded, it should read
Unless I'm unaware of some implementation difference between different engines, |
@dfdeagle47 there's actually some controversy regarding this particular snippet, as there is a slight chance we might remove it entirely iff we only need to check |
@Chalarangelo : ok makes sense now, I didn't know that part of the discussion. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks. |
Why do we need that extra
!!
?is empty, no falsy value is considered as an array
Maybe, I can create a PR with several such small changes instead of writing about every separately?
The text was updated successfully, but these errors were encountered: