Re:Deep-copying in JavaScript
by codeisawesome on Thursday January 25, 2018 @06:20PM
(#16235699)
> If you don’t expect cyclic objects and don’t need to preserve built-in types, you get the fastest clone across all browsers by using JSON.parse(JSON.stringify()), which I found quite surprising.
I wonder if that’s because browser devs know by now that this is a widely used technique and hence optimise for it.
I wonder if that’s because browser devs know by now that this is a widely used technique and hence optimise for it.