feature: Array Unqiue works with returned arrays #2137
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
I have a situation where I want to validate that v2 is unique across all v's. I wrote a decorator to handle this and was pointed over here for similar functionality but was unable to do what I was trying to accomplish.
Proposed solution
Adjust arrayUnique to use flatMap rather than map. This should only change its interaction with arrays.
Problem: Arrays that were to match based on reference would now be destructed into their components and I am unsure about the usage of this.
Alternative: Create a new decorator for this but it seems like overkill for this use case
The text was updated successfully, but these errors were encountered: