-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
array.unique doesn't validate duplicate dates #497
Comments
Like said in the documentation, only literals work currently, but looks like a bug to me. |
@hueniverse mind if I change that behavior ? Tests seem to explicitly deny that, was it for a reason ? |
The test confirms the docs. It was set this way to avoid expensive deep comparisons of objects. Whatever the change, it needs to perform well and to be well defined. Does unique means identical references or deep equality? |
I was going for deep equality. This needs to be made explicit that there will be a performance penalty on objects indeed. |
Hoek has utils for deep comparisons now. |
Yes, already did the code with that, just needs tests now. |
Cool. Thanks. |
Should not
array.includes(Joi.date()).unique()
validate duplicate dates?The text was updated successfully, but these errors were encountered: