+ function merge(obj, file) {
+ for (each in file) {
+ if (Array.isArray(obj[each]) && Array.isArray(file[each])) obj[each] = [ ...obj[each], ...file[each] ];
+ else if (Array.isArray(obj[each])) obj[each] = [ ...obj[each], file[each] ];
+ else if (Array.isArray(file[each])) obj[each] = [ obj[each], ...file[each] ];
+ else if (each in obj) obj[each] = [ obj[each], file[each] ];
+ else obj[each] = file[each];
+ }
+ }
+