Extend recursively #379

Closed
wants to merge 5 commits into
from

Projects

None yet

2 participants

@BenHall

_.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.

@BenHall

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

@jashkenas
Owner

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