- Implemented FormStep component for user input (name, email, address). - Created OtpStep component for OTP verification. - Developed SuccessStep component to display success messages based on account creation. - Introduced eligibility-check.store for managing state throughout the eligibility check process. - Added commitlint configuration for standardized commit messages. - Configured knip for workspace management and project structure.
22 lines
489 B
TypeScript
22 lines
489 B
TypeScript
/**
|
|
* Toolkit - Email Utilities
|
|
*
|
|
* Email utility functions (extraction, normalization).
|
|
* For email validation, use functions from common/validation.ts
|
|
*/
|
|
|
|
/**
|
|
* Extract domain from email address
|
|
*/
|
|
export function getEmailDomain(email: string): string | null {
|
|
const match = email.match(/@(.+)$/);
|
|
return match?.[1] ?? null;
|
|
}
|
|
|
|
/**
|
|
* Normalize email address (lowercase, trim)
|
|
*/
|
|
export function normalizeEmail(email: string): string {
|
|
return email.trim().toLowerCase();
|
|
}
|