Open JSEvgeny opened 8 months ago
Hey, thanks for reaching out. This feature doesn't exist at the moment. Probably a custom comparator
function we can take to customize the target diff.
A workaround would be to traverse the diff object and deleting the values having nullish update. You can utilize keepOldValueInDiff
parameter so that old value is also there in the diff object.
Hey there I hope you are doing great,
I was wondering if there is a away to ignore fields that have nullish values when diffing?
The use-case could be having, let's say, some value as
undefined
in the source object, but empty string or empty array for the same field in target (transformer may have converted undefined values to empty/nullish) and I would like not to consider these as a change for specific property, but ignore it fromchanges
object.Thank you in advance and have a great day 🙌