all files / src/ assign.ts

100% Statements 9/9
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11  29× 15× 15× 19× 17×     14×    
// a simple object merge function implementation
export default function(obj1, ...objs) {
	for (const obj2 of objs) {
		for (const k in obj2) {
			if (!obj2.hasOwnProperty(k)) continue
			obj1[k] = obj2[k]
		}
	}
	return obj1
}