/**
 * Helper function that checks if string is an email and it is valid
 * @param str
 * @returns boolean true if valid email
 */
export const isValidEmail = (str: string) => {
  const emailFormat = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/;
  if (str.match(emailFormat)) {
    return true;
  }
  return false;
};
