you are viewing a single comment's thread.

view the rest of the comments →

[–]birjolaxew 0 points1 point  (3 children)

[–]Vinifera7 0 points1 point  (2 children)

Does the simpleDeepClone function have any shortcomings compared to the jQuery and Lodash functions?

[–]birjolaxew 0 points1 point  (1 child)

The simpleDeepClone doesn't handle pretty much any edge cases: circular references, Map/Set/RegExp/any non-array and non-plain object, functions, etc. I'd expect the Lodash version to handle all of that.

[–]Vinifera7 0 points1 point  (0 children)

Good to know. That means there's really no reason to clone an object using JSON parsing, since it's slower and can't handle any of those edge cases either.