Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

234 B
Raw Blame
// Extract domain from email
export function extractEmailDomain(email: string) {
  const parts = email.toLowerCase().trim().split("@");

  if (parts.length !== 2 || !parts[0] || !parts[1]) {
    return null;
  }

  return parts[1];
}