Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clone support #90

Open
pi0 opened this issue Apr 17, 2023 · 0 comments · May be fixed by #92
Open

clone support #90

pi0 opened this issue Apr 17, 2023 · 0 comments · May be fixed by #92

Comments

@pi0
Copy link
Member

pi0 commented Apr 17, 2023

Currently, we only create new object/array when both defaults and current value have a value while if only there is value here we set it.

I am thinking to introduce a new option to createDefu(merger, { clone: true } to enable cloning behavior.

An alternative would be using structuredClone however i think it also copies the values (non object/array) and taking more memory also not available in (at least Node) workers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant