The type of the value to be cloned
The value to make immutable
A deeply immutable clone of value
Object.prototype) and arrays are cloned and frozen.
All other objects (Date, RegExp, Map, Set, class instances, objects with null
prototype, etc.) are returned as-is to preserve their functionality.length, name, prototype)
are preserved unchanged while custom writable properties are frozen recursively. Non-configurable
custom properties are skipped and remain in their original state.
Creates an immutable deep clone.
Plain objects, arrays, and functions with custom properties are recursively cloned and frozen. Functions without custom properties are returned as-is. Other object types (
Date,RegExp,Buffer, etc.) are returned as-is to preserve their functionality.Circular references are not supported. Do not pass objects with cycles.