Comparing version 0.3.5 to 0.3.6
@@ -149,2 +149,4 @@ 'use strict'; | ||
changes(new DiffNew(currentPath, rhs)); | ||
} else { | ||
changes(new DiffDeleted(currentPath, lhs)); | ||
} | ||
@@ -190,2 +192,5 @@ } else if (rtype === 'undefined') { | ||
stack.length = stack.length - 1; | ||
} else if (lhs !== rhs) { | ||
// lhs is contains a cycle at this element and it differs from rhs | ||
changes(new DiffEdit(currentPath, lhs, rhs)); | ||
} | ||
@@ -192,0 +197,0 @@ } else if (lhs !== rhs) { |
@@ -156,2 +156,4 @@ (function (global, factory) { | ||
changes(new DiffNew(currentPath, rhs)); | ||
} else { | ||
changes(new DiffDeleted(currentPath, lhs)); | ||
} | ||
@@ -197,2 +199,5 @@ } else if (rtype === 'undefined') { | ||
stack.length = stack.length - 1; | ||
} else if (lhs !== rhs) { | ||
// lhs is contains a cycle at this element and it differs from rhs | ||
changes(new DiffEdit(currentPath, lhs, rhs)); | ||
} | ||
@@ -199,0 +204,0 @@ } else if (lhs !== rhs) { |
{ | ||
"name": "deep-diff", | ||
"description": "Javascript utility for calculating deep difference, capturing changes, and applying changes across objects; for nodejs and the browser.", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -15,3 +15,7 @@ # deep-diff [![Build Status](https://travis-ci.org/flitbit/diff.png?branch=master)](https://travis-ci.org/flitbit/diff) | ||
`0.3.5` - 2017-04-23 — Rolled up recent fixes; patches: | ||
`0.3.6` - 2017-04-25 — Fixed, closed lingering issues: | ||
* fixed #74 — comparing objects with longer cycles | ||
* fixed #70 — was not properly detecting a deletion when a property on the operand (lhs) had a value of `undefined` and was _undefined_ on the comparand (rhs). :o). | ||
`0.3.5` - 2017-04-23 — Rolled up recent fixes; patches: | ||
* @stevemao — #79, #80: now testing latest version of node4 | ||
@@ -212,11 +216,11 @@ * @mortonfox — #85: referencing mocha's new home | ||
* `diff` - a function that calculates the differences between two objects. | ||
* `observableDiff` - a function that calculates the differences between two objects and reports each to an observer function. | ||
* `applyDiff` - a function that applies any structural differences from one object to another. | ||
* `applyChange` - a function that applies a single change record to an origin object. | ||
* `revertChange` - a function that reverts a single change record from a target object. | ||
* `diff(lhs, rhs, prefilter, acc)` — calculates the differences between two objects, optionally prefiltering elements for comparison, and optionally using the specified accumulator. | ||
* `observableDiff(lhs, rhs, observer, prefilter)` — calculates the differences between two objects and reports each to an observer function, optionally, prefiltering elements for comparison. | ||
* `applyDiff(target, source, filter)` — applies any structural differences from a source object to a target object, optionally filtering each difference. | ||
* `applyChange(target, source, change)` — applies a single change record to a target object. NOTE: `source` is unused and may be removed. | ||
* `revertChange(target, source, change)` reverts a single change record to a target object. NOTE: `source` is unused and may be removed. | ||
### `diff` | ||
The `diff` function calculates the difference between two objects. In version `0.1.7` you can supply your own `prefilter` function as the 3rd argument and control which properties are ignored while calculating differences throughout the object graph. | ||
The `diff` function calculates the difference between two objects. | ||
@@ -223,0 +227,0 @@ **Arguments** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93708
19
907
246