@cross/deepmerge v1.0.0
Key Features
- Cross-Runtime Compatibility:
- Deep Merging: Recursively combines objects at all levels of nesting.
- Array Merging Customization: Choose among strategies:
combine
(default): Concatenates arrays, preserves duplicates.unique
: Produces an array of unique elements.replace
: Overwrites the target array with the source array.
- Set Merging Customization: Select between strategies:
combine
(default): Adds new set elements.replace
: Overwrites the target set with the source set.
- Map Merging Customization: Select between strategies:
combine
(default): Adds new entries, replaces entries with the same key.replace
: Overwrites the target map with the source map.
- Date Merging Customization: Select between strategies:
replace
(default): Overwrites the target Date with the source Date.keepEarlier
: Keeps the earlier Date.keepLater
: Keeps the later Date.
- Supply custom merging functions: Allows specifying custom merge functions for handling specific types or
structures during the merge process.
For documentation and usage see deepmerge on JSR.io
Full Changelog: https://github.com/cross-org/deepmerge/commits/1.0.0