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

extend logic for updatedDiff #36

Closed yurks closed 6 years ago

yurks commented 6 years ago

For now .updatedDiff() method returns summary of updated keys with actual values. All seems correct, but.. We already have new fresh object received with all actual data inside. Imagine we would like to save it and overwrite an old data. And wand to preserve changes history. No chance to get previous data for updated keys for now.

Maybe .updatedDiff(oldObj, newObj, [showOldValuesForUpdatedKeys= true|false ] )?

mattphillips commented 6 years ago

Hey @yurks I'm not sure I understand what you are asking. Would you be able to give me an example of what you want?

mattphillips commented 6 years ago

Closing for now due to inactivity - happy to reopen with more details