lukeed / dset

A tiny (197B) utility for safely writing deep Object values~!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Immutable structures cannot be used unless a copy is created

KL13NT opened this issue · comments

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.

Nevermind, forgot about clean-set.