docs: function ref_copy(from) {
  
  	//console.log( 'at ref_copy(): from = ' + JSON.stringify(from) );
  	//console.log( 'typeof from = ' + (typeof from) );
  
  	var to;
  
  	// Handle arrays
  	if( from && (typeof from === 'object') && (from instanceof Array) ) {
  		//console.log( '^ from is Array: ' + JSON.stringify(from) );
  
  		to = ARRAY(from).map(ref_copy).valueOf();
  
  	// Convert objects with a property `$ref` as a function shortcut to `Resource.get(url, opts)`;
  	} else if( from && (typeof from === 'object') && (from.$ref !== undefined) ) {
  		//console.log( '^ from is $ref-object: ' + JSON.stringify(from) );
  
  		var url = from.$ref;
  		to = new Resource.Partial();
  
  		ref_copy_self(to, from);
  
  		if(!is.string(to.$ref)) {
  			debug.log('Warning! Partial object from '+ url +' does not have property $ref!');
  		}
  
  	// Convert normal objects
  	} else if( from && (typeof from === 'object') ) {
  
  		to = {};
  		//console.log( '^ from is plain object: ' + JSON.stringify(from) );
  		ref_copy_self(to, from);
  
  	// Anything else is passed directly back
  	} else {
  		//console.log( '^ from is other type: ' + JSON.stringify(from) );
  		to = from;
  	}
  
  	//console.log('..returning ' + JSON.stringify(to) + ' of type ' + (typeof to));
  	return to;
  }