The object to copy
If true, handles circular references and complex objects for safe JSON serialization. When enabled, circular references are replaced with '[Circular Reference]', complex objects (Sockets, Streams, etc.) are replaced with their type names, Error objects are specially handled to extract name/message/stack, and Dates are converted to ISO strings. Default: false
Maximum recursion depth when resolveCircularReferences is true (default: 10)
A new object with scalars and arrays copied
This utility function will copy all scalar and array properties from an object to a new object and return the new object. This function will NOT copy functions or non-plain objects (unless resolveCircularReferences is true).