Closed filipsobol closed 2 weeks ago
When working on PR #794 I noticed that lodash has a special handling for when a prototype is passed to the deepClone method.
deepClone
This is just an FYI, as I don't have any need for this functionality.
Minimal reproduction:
import { cloneDeep as lodashDeepClone } from 'lodash-es'; import { cloneDeep } from 'es-toolkit'; console.log( lodashDeepClone( String.prototype ) ); // Results in [String: ''] console.log( cloneDeep( String.prototype ) ); // Results in {}
Actually, it works as expected when using es-toolkit/compat.
es-toolkit/compat
When working on PR #794 I noticed that lodash has a special handling for when a prototype is passed to the
deepClone
method.This is just an FYI, as I don't have any need for this functionality.
Minimal reproduction: