Actually I'd expect Object.create() to deep copy the input, but somehow it doesn't.
-
-
Replying to @yoshuawuyts
@yoshuawuyts var newObj = Object.create(Object.prototype, oldObj); does that work?1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@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 …1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts A native Object.clone would indeed be very usefull.1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts The MDN docs make you think it should be possible with Object.create though. But I guess the 2nd argument is shallow.1 reply 0 retweets 0 likes
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.