
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!
Thanks for the article.
Good article. Thanks, I got a new good knowledge. :)
Neat! Thanks for the writeup!
tks for the post
👍
AI much? You didn't even care to run and print the results of 4) 🙄
Thanks for sharing
Good read !
Console output is missing from section 4
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.
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
?.Thanks for the article
Thank for sharing
Circular Reference with {...obj}
Impressive.