src/merge.js
function _copy_property(opts, key, a, b) {
	debug.assert(opts).is('object');
	debug.assert(key).is('string');
	debug.assert(a).is('object');
	debug.assert(b).is('object');

	a[key] = b[key];

	if(opts.cache && opts.cache._has_cursors && is.obj(b[key]) && b[key].hasOwnProperty('$id')) {
		var f = opts.cache.findCursor(b, key);
		if(f) {
			//debug.log('Expanding cursor...');
			opts.cache.addToCursor(f, a, key);
		}

	}
}
function _copy_property(opts, key, a, b) {
	debug.assert(opts).is('object');
	debug.assert(key).is('string');
	debug.assert(a).is('object');
	debug.assert(b).is('object');

	a[key] = b[key];

	if(opts.cache && opts.cache._has_cursors && is.obj(b[key]) && b[key].hasOwnProperty('$id')) {
		var f = opts.cache.findCursor(b, key);
		if(f) {
			//debug.log('Expanding cursor...');
			opts.cache.addToCursor(f, a, key);
		}

	}
}
function _copy_property ( opts , key , a , b ) { debug . assert ( opts ) . is ( 'object' ) ; debug . assert ( key ) . is ( 'string' ) ; debug . assert ( a ) . is ( 'object' ) ; debug . assert ( b ) . is ( 'object' ) ; a [ key ] = b [ key ] ; if ( opts . cache && opts . cache . _has_cursors && is . obj ( b [ key ] ) && b [ key ] . hasOwnProperty ( '$id' ) ) { var f = opts . cache . findCursor ( b , key ) ; if ( f ) { //debug.log('Expanding cursor...'); opts . cache . addToCursor ( f , a , key ) ; } } }
Copy property from a to b
@param opts {object} Options
@param key {string} The keyword of the property
@param a {object} Copy to
@param b {object} Copy from
Copy property from a to b