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! :)
Thanks for sharing
Thanks for the article.
AI much? You didn't even care to run and print the results of 4) 🙄
👍
tks for the post
Neat! Thanks for the writeup!
Good article. Thanks, I got a new good knowledge. :)
Good to know!
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 copyof aobjectwith having function then{...object}is the way but is there any way to deeply clone aobjectwith havingfunctions?.Thanks for the article
Thank for sharing
Circular Reference with {...obj}
Impressive.