本文主要包含extend,extend是什么意思,extendscript.dll下载,extendscript.dll,jquery extend等相关知识,ISaiSai的专栏希望在学习及工作中可以帮助到您
参考文档https://github.com/justmoon/node-extend
npm install extend
如下将输出
{“userName”:{“first”:”C”,”second”:”B”},”age”:2}
const extend = require('extend');
const config = {
userName: {
first: "A",
second: "B"
},
age: 2
};
const results = extend(true, config, {
userName: {
first: "C"
},
})
//Object.assign(config, {
// userName: {
// first: "C"
// },
//
// });
console.log(JSON.stringify(config));