deep-difference

1.0.1 • Public • Published

deep-difference

Get difference object from two objects in deep compare

Usage

// use npm
npm i --save deep-difference
// use yarn
yarn add deep-difference

// es6 
import deepDifference from 'deep-difference';

const compare = { foo: "foo", bar: { abc: "abc" }  }
const compareWith = { foo: "foo", bar: { abc: "cde" }  }

const result = deepDifference(compare, compareWith)
// the reulst should be { bar: { abc: "abc" } }

Test

npm run test

License

ISC

Keywords

deep difference

Package Sidebar

Install

npm i deep-difference

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

3.43 kB

Total Files

5

Last publish

Collaborators

  • linyongping