
What is structuredClone()?
structuredClone() is a global function introduced in 2022 that enables deep cloning of JavaScript objects. Unlike t...
For further actions, you may consider blocking this person and/or reporting abuse
Finally something new, that hasn't been already mentioned all over the internets . Thanks! :)
Good to know!
AI much? You didn't even care to run and print the results of 4) 🙄
Thanks for the article.
Thanks for sharing
Good article. Thanks, I got a new good knowledge. :)
👍
tks for the post
Neat! Thanks for the writeup!
Good read !
Your performance assesment is a bit inaccurate. From my findings, large structures are handled faster with structuredClone but complex structures go faster with stringify.
For large and complex it depends if it's larger than complex or complex-er than large. I don't know where exactly the threshold lies between those nor am I sure there is only one threshold.
the "Efficiency" point of your conclusion is up for debate IMHO. The other points are clearly not debatable.
Console output is missing from section 4
Very informative.
If we want a
shallow copy
of aobject
with having function then{...object}
is the way but is there any way to deeply clone aobject
with havingfunctions
?.Thank for sharing
Thanks for the article
Circular Reference with {...obj}
Impressive.