Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@mallusrgreat/object-difference

mallusrgreatv244MIT1.0.2TypeScript support: included

View the difference between two objects.

object difference, object-difference, object-diff

readme

Object Difference

This package helps you get all (and only) the differences between two objects.

import { objectDifference } from "@mallusrgreat/object-difference";
// or
const { objectDifference } = require("@mallusrgreat/object-difference");

console.log(
  objectDifference(
    {
      test: "abc",
      one: 1,
      three: 4,
    },
    {
      test: "123",
      one: 1,
      three: 3,
    }
  )
);

Logs:

{
  "test": {
    "old": "abc",
    "new": "123"
  },
  "three": {
    "old": 4,
    "new": 3
  }
}