@yoshuawuyts var newObj = Object.create(Object.prototype, oldObj); does that work?
Actually I'd expect Object.create() to deep copy the input, but somehow it doesn't.
-
-
-
@jonkoops nope, that only creates a shallow copy. You must manually go over all children and copy those too. - 5 more replies
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@yoshuawuyts How are you calling the Object.create?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.