export function normalizeEmail(value: string) {
  return value.trim().toLowerCase();
}

export function normalizeOptionalEmail(value?: string) {
  if (!value) {
    return undefined;
  }

  const normalized = normalizeEmail(value);
  return normalized || undefined;
}

export function normalizeText(value?: string) {
  if (!value) {
    return undefined;
  }

  const normalized = value.trim();
  return normalized || undefined;
}

export function normalizePhoneNumber(value: string) {
  return value.trim();
}
