We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
value = (comparator || value !== 0) ? value : 0;
in https://github.com/lodash/lodash/blob/master/.internal/baseDifference.js#L46 what does this sentence mean? Is it useless? :-)
The text was updated successfully, but these errors were encountered:
Hi @fi3ework!
That bit ensures that a positive 0 is used because -0 is a thing in JS.
0
-0
Sorry, something went wrong.
@jdalton yeah, I know the exist of -0, but why change -0 to +0 ? Why not just use -0 directly? :-)
Because internally we use Set for deduping and Set doesn't distinguish between the two.
Set
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
in https://github.com/lodash/lodash/blob/master/.internal/baseDifference.js#L46
what does this sentence mean? Is it useless? :-)
The text was updated successfully, but these errors were encountered: