arccore.util.deepCopy is not general-purpose #1
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
test
Related to test coverage
arccore.util.deepCopy (aka arccore.util.clone) derives from an implementation taken from the CoffeeScript Cookbook. This function has generally performed well. But, it's not well tested. And, it's not adequately documented...
... Specifically, it does not appear that this function handles arrays correctly. And, all manner of hell can break loose if the input reference is to something with internal cycles.
Take another look at this:
Should work for arrays (add tests)
Should not allow stack overflow due to unbounded recursion
Here's a little code fragment I authored that's related to arccore.util.deepCopy (used in the context of trying to clone DirectedGraph class instances).
The text was updated successfully, but these errors were encountered: