ljharb / prop-types-tools

Custom React PropType validators
MIT License
671 stars 50 forks source link

[New] add optional `mapper` function to `uniqueArrayOf` #29

Closed jeffjc97 closed 7 years ago

jeffjc97 commented 7 years ago

Added new propType uniqueArrayWithMapper: uniqueArray, with an additional function parameter that allows for a non-standard unique calculation (Object.is). The function is applied to each element in the array, and the resulting values are compared using the standard unique calculation.

ljharb commented 7 years ago

Released in v2.8.0. Thanks!!