forked from TehShrike/deepmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can now specify always-push behaviour for arrays. Closes TehShrike#14
- Loading branch information
1 parent
2d19183
commit d6d7387
Showing
3 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
var merge = require('../') | ||
var x = { foo : { 'bar' : 3 } } | ||
var y = { foo : { 'baz' : 4 }, quux : 5 } | ||
var x = { foo : { 'bar' : 3 }, ar : [ { thing : 'b' } ], simplear: [1, 2, 3] } | ||
var y = { foo : { 'baz' : 4 }, quux : 5, ar : [ { thing : 'a' } ], simplear: [4, 5] } | ||
var merged = merge(x, y) | ||
console.dir(merged) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters