Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 416 Bytes

File metadata and controls

24 lines (13 loc) · 416 Bytes

Object deep differ

Return the difference between the source object and the default object.

Installation

npm install --save object-deep-differ

Usage

const diff = require('object-deep-differ');

const defaultObj = {a:{b:{c:'hello'}}}

const sourceObj = {a:{d:{e:'hello world'}}}

console.log(diff(defaultObj, sourceObj)); // outputs {a:{d:{e:'hello world'}}}

Tests

npm test