Copy/Clone Object deeply.
Custom class instances are copied as plain objects containing their own properties. Unsupported native instances are preserved by reference.
Usage:
import { deepCopy } from "mazey";const ret1 = deepCopy(["a", "b", "c"]);const ret2 = deepCopy("abc");console.log(ret1);console.log(ret2); Copy
import { deepCopy } from "mazey";const ret1 = deepCopy(["a", "b", "c"]);const ret2 = deepCopy("abc");console.log(ret1);console.log(ret2);
Output:
["a", "b", "c"] abc Copy
["a", "b", "c"] abc
The value to clone.
Returns the deep cloned value.
Copy/Clone Object deeply.
Custom class instances are copied as plain objects containing their own properties. Unsupported native instances are preserved by reference.
Usage:
Output: