microdiff icon indicating copy to clipboard operation
microdiff copied to clipboard

feat: add shallow comparison option to ignore nested objects and arrays

Open RafaelHubGit opened this issue 2 months ago • 0 comments

Add new 'shallow' option to diff function that performs shallow comparison by only comparing primitive values at the first level and ignoring nested objects and arrays. This is useful when you only need to track changes in top-level primitive properties without recursing into complex structures.

Changes:

  • Add 'shallow' boolean option to Options interface
  • Skip objects/arrays in REMOVE, CHANGE, and CREATE operations when shallow mode is enabled
  • Update test data with simplified car examples instead of provider data
  • Add comprehensive tests for shallow vs deep comparison modes

RafaelHubGit avatar Nov 12 '25 21:11 RafaelHubGit