Skip to content

Commit

Permalink
Incremented version and added cycles section
Browse files Browse the repository at this point in the history
  • Loading branch information
AsyncBanana committed Nov 13, 2021
1 parent cd0b866 commit c8efe46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ The `path` property gives a path to the property in the new object (or the old o
Each element in the paths is a key to the next property a level deeper until you get to the property changed, and it is string or a number, depending on whether the object is an Array or Object (Objects with number keys will still be strings).
The `value` property exists in types `CREATE` and `CHANGE`, and it contains the value of the property added/changed.

# Cycles support

By default cycles are supported, but if you are sure that the object has no cycles (for example if you are parsing JSON) you can disable cycles using the `cyclesFix` option.

```js
diff(obj1, obj2, { cyclesFix: false });
```

# Benchmarks

```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "microdiff",
"version": "1.1.3",
"version": "1.2.0",
"description": "Small, fast, zero dependency deep object and array comparison",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand Down

0 comments on commit c8efe46

Please sign in to comment.