Code coverage report for nock/lib/mixin.js

Statements: 83.33% (10 / 12)      Branches: 50% (2 / 4)      Functions: 100% (2 / 2)      Lines: 100% (10 / 10)      Ignored: none     

All files » nock/lib/ » mixin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17    1 1     1 1 1 1 1 1   1     1
'use strict';
 
function clone(o) {
	return JSON.parse(JSON.stringify(o));
}
 
function mixin(a, b) {
	Iif (! a) { a = {}; }
	Iif (! b) {b = {}; }
	a = clone(a);
	for(var prop in b) {
		a[prop] = b[prop];
	}
	return a;
}
 
module.exports = mixin;