mattphillips / deep-object-diff

Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
https://www.npmjs.com/package/deep-object-diff
MIT License
1.05k stars 89 forks source link

deletedDiff returns undefined values that are not JSON valid #27

Closed boshka closed 6 years ago

boshka commented 6 years ago

Could there be an option that would result in deletedDiff returning other values, such as null instead of undefined?

mattphillips commented 6 years ago

Hey @boshka this sounds similar to this issue #10 what you can do is supply a replacer function to JSON.stringify to convert the undefined values to null or anything you like. There is an example of this in action in #10

Let me know if that solves your problem

boshka commented 6 years ago

Hi Matt, sorry, haven't noticed that solution. Thank you, that works!