Echo JS 0.11.0

<~>

tracker1 9 days ago. link 2 points
For me the most common use cases for cloning are for logging, or a sanity check before crossing a wire (often for API responses and/or errors).  So true clones aren't needed, same for prototype chains.  What you do want to avoid is to have circular references plucked, and/or pull up error message/stack properties out of the prototype instance.

I created an npm module (safe-clone-deep), and helped with another (fclone).  I mostly just use fclone these days.
mwanago 9 days ago. link 1 point
Thanks, I'm going to check them out.
My intention in pointing out that prototype chain is not copied was to bring to the reader's attention that it is not a true, 100% clone.
Cheers!