nested-diff
Calculating deep difference for JavaScript objects. Inspired by https://github.com/flitbit/diff
Example Usage
var nestedDiff = nestedDiff; var lhs = name: 'my object' description: 'it\'s an object!' details: it: 'has' an: 'array' with: 'a' 'few' 'elements' ; var rhs = name: 'updated object' hello: 'world' details: it: 'has' an: 'what' with: 'elements' 'a' 'few' 'more' than: 'before' ; ;
kind
- indicates the kind of change; will be one of the following:N
- indicates a newly added property/elementD
- indicates a property/element was deletedE
- indicates a property/element was editedA
- indicates a change occurred within an array
key
- the property namelhs
- the value on the left-hand-side of the comparison (undefined if kind === 'N')rhs
- the value on the right-hand-side of the comparison (undefined if kind === 'D')differences
- Nested differences