Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate docs for `_.intersectionWith` comparator to avoid confusion regarding comparator argments #4720
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just ran into the same issue as here: #2798
It current says "The comparator is invoked with two arguments: (arrVal, othVal).". I assumed that
arrVal
was the first array, andothVal
would always be one of the other arrays.When you read "The order and references of result values are determined by the first array", it also makes you think that
arrVal
is always the first array.Also the signature is written as:
It should be made clear that the params of the comparator can be either
objects
or any of theothers
arrays.