deep extend (like jQuery's) for nodeJS

后端 未结 11 881
情歌与酒
情歌与酒 2020-12-13 17:27

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, bu

11条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 18:03

    Sharped version called whet.extend.

    I re-write node-extend with CoffeeScript and add travis-ci test suite, because I need deep coping in Node for myself, so now it is here.

    And yes, I think in some case its absolutely correctly to use deep merge, for example I use it at config works, when we are need to merge default and user branches together.

提交回复
热议问题