_.cloneDeep behavior with custom class instances and prototype preservation
The _.cloneDeep function in lodash is designed to recursively clone nested objects, arrays, and ES6 collections like Map and Set while managing circular references to prevent stack overflows. A specific design constraint exists regarding prototype chains. While the function creates new instances of built-in types, it primarily clones enumerable own propertie