You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dset mutates the source object but doesn't return it. If the object was returned, we would get these advantages:
would simplify the case of immutability: instead of having to create a wrapper (as suggested in this section in the README), we could simply do modifiedObj = dset(klona(originalObj), keyPath, val)
would make dset more aligned with it's cousin Object.assign, which "copies all enumerable own properties to a target object and returns the modified target object"
I'm happy to submit a PR if this is a desired feature.
The text was updated successfully, but these errors were encountered:
dset
mutates the source object but doesn't return it. If the object was returned, we would get these advantages:modifiedObj = dset(klona(originalObj), keyPath, val)
dset
more aligned with it's cousinObject.assign
, which "copies all enumerable own properties to a target object and returns the modified target object"I'm happy to submit a PR if this is a desired feature.
The text was updated successfully, but these errors were encountered: