Skip to content

Commit cd0b866

Browse files
committed
Added information on array paths
1 parent 1409d2d commit cd0b866

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ If you are using CommonJS, you can import it like this:
4949
const diff = require("microdiff").default;
5050
```
5151

52-
There are three different types of changes. `CREATE`, `REMOVE`, and `CHANGE`. The `path` property gives a path to the property in the new object (or the old object in the case of `REMOVE`). Each element in the array is a key to the next property a level deeper until you get to the property changed. The `value` property exists in types `CREATE` and `CHANGE`, and it contains the value of the property added/changed.
52+
There are three different types of changes. `CREATE`, `REMOVE`, and `CHANGE`.
53+
The `path` property gives a path to the property in the new object (or the old object in the case of `REMOVE`).
54+
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).
55+
The `value` property exists in types `CREATE` and `CHANGE`, and it contains the value of the property added/changed.
5356

5457
# Benchmarks
5558

0 commit comments

Comments
 (0)