Recursive/deep extend/assign in Underscore.js?

后端 未结 6 1373
遥遥无期
遥遥无期 2020-11-29 10:47

Is there any way to get Underscore.js extend function:

Copy all of the properties in the source objects over to the destination object, and return t

6条回答
  •  囚心锁ツ
    2020-11-29 11:21

    underscore's extend() does not do deep extend; as a matter of fact, there is no function in underscore which can deep extend.

    You may use lodash's merge for that.

提交回复
热议问题