The deep copy strategy

Higher level indicates more accuracy but probably less performance.

Enumeration Members

Enumeration Members

None: "none"

Avoid deep copy

This avoids any copy, and recursive objects can be handled without any failing. However, changing non-copied data will sometimes break the logic.

Simple: "simple"

Do a simple deep copy

This simply clones each enumerable fields in an object to a new object. It causes stack overflow in recursive objects. Everything in prototypes is ignored.

SimpleWithRecursion: "simple-recursion"

Do a deep copy with recursion detection

This clones each enumerable fields in an object to a new object. It can handle recursive objects by recursive detection. Everything in prototypes is ignored.