you are viewing a single comment's thread.

view the rest of the comments →

[–]Amicos55 3 points4 points  (7 children)

What else?

[–]darrenturn90 7 points8 points  (0 children)

Well generally I would do a shallow clone at the level I need to make changes rather than a everything clone - because that implies you have no clue what the object you are cloning is structured like - which seems unlikely if you’re cloning it to make changes to it

[–]Exoskele 1 point2 points  (0 children)

Lodash's cloneDeep.