I am struggling with deep copies of objects in nodeJS. my own extend is crap. underscore's extend is flat. there are rather simple extend variants here on stackexchange, but none are even close to jQuery.extend(true, {}, obj, obj, obj) .. (most are actually terrible and screw up the benefits of asnyc code.)
hence, my question: is there a good deep copy for NodeJS? Has anybody ported jQuery's ?
It's already been ported. node-extend
Note the project doesn't have tests and doesn't have much popularity, so use at your own risk.
As mentioned you probably don't need deep copies. Try to change your data structures so you only need shallow copies.
I wrote a smaller module instead, recommend you use xtend. It's not got an implementation containing jQuery baggage nor does it have bugs like node-extend does.