Relative to most purpose built deep clone libraries I've tried and most manual deep clones I've seen tried that use some combination of DFS and Object.assign.
Obviously YMMV, and your performance needs likely differ from my own.
(Personally, at this point I try to use immutability [with ImmutableJS or friends] over deep cloning, but sometimes a deep clone is still handy.)
Obviously YMMV, and your performance needs likely differ from my own.
(Personally, at this point I try to use immutability [with ImmutableJS or friends] over deep cloning, but sometimes a deep clone is still handy.)