Releases: cross-org/deepmerge
Releases · cross-org/deepmerge
1.0.1
- deepMerge: Explicit default merge strategies; consistent behavior when options are omitted.
- simpleMerge: Map and Set are no longer treated as plain objects; they are replaced by the source value.
- Docs: Fixed JSDoc formatting for merge strategy options.
- Code: Use array destructuring instead of
sources.shift()for recursion. - Tests: Coverage for date strategies (
keepEarlier/keepLater), custom merge functions, and circular references.
1.0.0
@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