Deep-copying in JavaScript using structuredClone
web.dev
web.dev
Tangent: What are they referring to when they write "The Platform" (capitalized) as in "The Platform now ships with ....".
It sounds a little too Borg-like and creepy.
I am confused why they made it a global function though rather than a static method like object.assign though
also
> Functions: If your object contains functions, they will be quiety discarded.
that is a bit of a let down
So the safest option is to not support serialization.
For example when you run a Node.JS profiling on the PouchDB test suite, most CPU cycles are spend in running the clone() function.
Having an updated performance comparison of structuredClone() would be great.
There’s a lot of challenges and problems with deep copying, better to find another way.
What's "The Platform"?