Skip to content

Commit

Permalink
docs: update example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed May 20, 2024
1 parent 1bcf521 commit 65658c8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,19 @@ const y = {
]),
};

const merged = deepmerge(x, y);
const z = {
record: {
prop1: undefined,
prop3: undefined,
prop2: undefined,
prop4: undefined,
},
array: undefined,
set: undefined,
map: undefined,
};

const merged = deepmerge(x, y, z);

console.log(merged);

Expand All @@ -109,6 +121,7 @@ console.log(merged);
// "prop1": "changed",
// "prop2": "value2",
// "prop3": "value3",
// "prop4": undefined,
// },
// "array": Array [1, 2, 3, 2, 3, 4],
// "set": Set { 1, 2, 3, 4 },
Expand Down

0 comments on commit 65658c8

Please sign in to comment.