text: 'use strict';
  
  var contacts = window.contacts || {};
  
  contacts.adaptAndMerge = function(incomingContact, matches, callbacks) {
    var listIds = Object.keys(matches);
    var totalMatches = listIds.length;
  
    // First contact here we take as the master
    var masterContact = matches[listIds[0]].matchingContact;
    var matchingContacts = [];
    for (var j = 1; j < totalMatches; j++) {
      matchingContacts.push(matches[listIds[j]]);
    }
    // Finally the last matching is the incoming itself
    matchingContacts.push({
      matchingContact: incomingContact,
      target: '',
      matchedValues: []
    });
  
    contacts.Merger.merge(masterContact, matchingContacts, callbacks);
  };
  