util.js 253 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 /** * 采集系统的工具库 */ //浅层合并对象 exports.merge = function(obj1, obj2) { var ret = {}; for (var attr in obj1) { ret[attr] = obj1[attr]; } for (var attr2 in obj2) { ret[attr2] = obj2[attr2]; } return ret; };