Priority-based merging #56
NightProgramming
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current approach is based on direction:
Maybe there could be an option to go by priority instead of direction:
Here is the priority used by object-merge-advanced. So according to that the winner would be the date object (meaning
merged.key1
contains the date). But I guess even custom priorities would be thinkable, defined by an array of symbols or strings describing the priority of different kinds of values e.g.["emptyArray", "null"]
would prioritize empty arrays higher than null values.Yet again this can already be done via custom merging, but maybe some support for this would be nice.
Beta Was this translation helpful? Give feedback.
All reactions