code: function formatPhone(phone: ?string): null | string {
    if (!phone) {
      return null;
    }
  
    let newPhone = String(phone)
      .trim()
      .replace(/\D/g, "");
    let prefix = "";
    if (newPhone.length < 10) {
      return phone; // Phone number is missing digits or otherwise incorrect, return original
    } else if (newPhone.length - 11 >= 1) {
      prefix += "+"; // Allow international phone format
      prefix += format("%s ", newPhone.substr(0, newPhone.length - 10));
      newPhone = newPhone.substr(-10);
    } else if (newPhone.length === 11) {
      newPhone = newPhone.substr(-10);
    }
  
    return _.spread((coverage, areaCode, part1, part2) => {
      return !newPhone
        ? phone
        : format("%s(%s) %s-%s", prefix, areaCode, part1, part2);
    })(newPhone.match(/^(\d{3})(\d{3})(\d{4})$/));
  }
docs: /*
  Formats a given phone number into a consistent format
  Note: If phone has extension, this is not a suitable function.
  
  Ex:
  formatPhone('800.123.1234')
  '(800) 123-1234'
  
  @param {String} User passed phone number to format
  @returns {String} Formatted Number