18 lines
459 B
TypeScript
Raw Normal View History

2021-12-06 23:26:38 +08:00
/*
node对象
*/
class ObjectOperation {
static combineObject(...objs) {
if (objs.length == 1 && objs[0] instanceof Array) {
objs = objs[0];
}
let sum = {};
let length = objs.length;
for (let i = 0; i < length; i++) {
sum = Object.assign(sum,objs[i]);
}
return sum;
}
}
2021-06-21 16:32:10 +08:00
export default ObjectOperation