#JavaScript has no proper way to clone deep objects properly. So here is a
comparison of all the wrong ways that get the job done:
https://dassur.ma/things/deep-copy/
JSON.parse(JSON.stringify(obj)) // is the winner with some caveats
A static archive of Markus Tacker's tweets. Follow me on Mastodon: @[email protected].
#JavaScript has no proper way to clone deep objects properly. So here is a
comparison of all the wrong ways that get the job done:
https://dassur.ma/things/deep-copy/
JSON.parse(JSON.stringify(obj)) // is the winner with some caveats