Extend recursively #379

wants to merge 5 commits into

2 participants


_.extend handles merges source sub-hash elements with the destination property. Previously it would override the sub-items of the destination property with the source.


I added support for arrays in commit 83133be but I'm not 100% sure if this is a good idea.


Yep -- this is extremely unreliable, which is why Underscore doesn't do it. If you'd like to take a look at the kind of thing that would be necessary to do this in a foolproof fashion, check out _.isEqual.

@jashkenas jashkenas closed this Nov 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment