Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which is the first method they mention and just flat out tell to avoid it.

"cloneJSON is very slow and can’t do much. Please avoid it."

I mean, I also use it since forever.

But I might look into the winner cloneLib.

If it is really faster, it might be worth it, but I likely still won't trust it for anything complex.



Emphasis on _data_. I don't have a need to clone complex objects (what the article is trying to do). The data I need to clone are usually small so when it comes to performance it's negligible, not worth adding another dependency to the project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: