Changelog
September 20, 2019 ยท View on GitHub
4.0
- Breaking change: the previous default export is now called
wrap() - Possible breaking change:
object-path-immutablenow uses ES modules which means if you are in an ESM environment you will have to use named exports.
3.0
- Possible breaking change
mergenot does not accept options anymore - Removed dependency on
deepmerge
2.0
- Possible breaking change The library now has dependencies and is building with Rollup, therefore the UMD entry point is now
dist/object-path-immutable. If you are using thisobject-path-immutablewith Node or another module bundler, this change should not affect you. - Added
mergefunction
1.0
- Breaking change: The way the library handles empty paths has changed. Before this change,all the methods were returning the original object. The new behavior is as follows.
set(src, path, value):valueis returnedupdate(src, path, updater):valuewill be passed toupdater()and the result returnedset(src, path, ...values):valueswill be concatenated tosrcifsrcis an array, otherwisevalueswill be returnedinsert(src, path, value, at): ifsrcis an array then it will be cloned andvaluewill be inserted atat, otherwise[value]will be returneddel(src, path): returnsundefinedassign(src, path, target): Target is assigned to a clone ofsrcand returned