rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.37k stars 195 forks source link

replace() uses the passed in merger #252

Closed austinried closed 5 years ago

austinried commented 6 years ago

I have a use case where I need to use a customized merger to compare deep array equality, and this seems to work for merge() but not where I need it, which is replace(). So, I've updated it to take the same merger function as merge().

crudh commented 6 years ago

@austinried Can't you use merge with mode: replace instead? Since replace is only a wrapper for merge?