export function getInitial(firstName = '', lastName = '') {
  let initial = '';
  if (firstName) {
    firstName = firstName.trim();
    initial = firstName[0];
  }
  if (lastName) {
    lastName = lastName.trim();
    initial += initial ? lastName[0] : lastName.substring(0, 2);
  }
  return initial ? initial.toUpperCase() : initial;
}
export function getInitialByPattern(firstName, lastName, pattern) {
  if (pattern[0] === 'FIRST_NAME') {
    return getInitial(firstName, lastName);
  }
  return getInitial(lastName, firstName);
}
