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

Docs should be explicit about the comparator used in union, difference, and intersection #700

Closed
dlee opened this issue Aug 13, 2012 · 1 comment

Comments

@dlee
Copy link

dlee commented Aug 13, 2012

The uniq function explicitly states that the === operator is used to test for object equality. The union, difference, and intersection functions should also explicitly state how object equality is tested.

@jashkenas
Copy link
Owner

Actually, I think we could do with being a little less pedantic about value comparisons. All equality in Underscore is strict equality, unless the API says otherwise. In the case of uniq, the alternative is to pass an iterator function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants