Plain objects and arrays are copied recursively and frozen. Dates, Maps and Sets
are copied too (Map and Set contents recursively), but freezing does not stop
their own methods, such as setTime or set, from changing them.
Use the built-in structuredClone(obj), which also copies objects that refer to
themselves. Unlike clone, it doesn't freeze the copy, and it throws on functions.
Will be removed in goldies 6.0.
Creates a deep, frozen clone of an object.
Plain objects and arrays are copied recursively and frozen. Dates, Maps and Sets are copied too (Map and Set contents recursively), but freezing does not stop their own methods, such as
setTimeorset, from changing them.