Skip to content

A better way to test for changes #97

Open
@robcdd

Description

@robcdd

https://github.com/mattphillips/deep-object-diff/blob/a24d61fea6d6d644fc3e32a853f685953d6d5b41/src/added.js#LL5C1-L5C1

  if (lhs === rhs || !isObject(lhs) || !isObject(rhs)) return {};

If we could return null here, so that in detailedDiff we could receive added: null, it would be very easy to see that nothing was added. Currently is seems that we have to use Object.keys(diff.added).length to find out if anything was added. Same for deleted and updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions