lukeed / dset

A tiny (197B) utility for safely writing deep Object values~!
MIT License
759 stars 25 forks source link

Immutable structures cannot be used unless a copy is created #15

Closed KL13NT closed 4 years ago

KL13NT commented 4 years ago

The way the library works at its current state is that it modifies the original passed object, requiring a bit of boilerplate for copy creation before passing a value in to dset.

A breaking update could introduce the ability to create a copy, modify it, and return the result, all internally. It could also be a non-breaking update in which a flag is added as the fourth parameter to determine whether a copy should be created or if the passed value should be directly modified.

I'm willing to PR this.

KL13NT commented 4 years ago

Nevermind, forgot about clean-set.