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.
-
-
@jonkoops I had the same expectations writing an algorithm last week, turned out I had to do shit like this™ - https://github.com/yoshuawuyts/squarepusher/blob/master/client/modules/list/list.js#L101 … -
@yoshuawuyts A native Object.clone would indeed be very usefull. - 3 more replies
New conversation -
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.