@mikkelscheike/email-provider-links
Version:
TypeScript library for email provider detection with 140 providers (259 domains), concurrent DNS resolution, alias normalization, and HTTPS login URL validation for login and password reset flows
38 lines • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DnsConstants = exports.MemoryConstants = exports.EmailLimits = void 0;
/**
* Email validation constants based on RFC 5321
*
* These limits are defined in RFC 5321 Section 4.5.3.1:
* - Maximum total email length: 254 characters
* - Maximum local part length: 64 characters
* - Maximum domain length: 253 characters
*/
exports.EmailLimits = {
/** Maximum total email address length (local + @ + domain) */
MAX_EMAIL_LENGTH: 254,
/** Maximum local part length (before @) */
MAX_LOCAL_PART_LENGTH: 64,
/** Maximum domain length (after @) */
MAX_DOMAIN_LENGTH: 253,
};
/**
* Memory calculation constants
*/
exports.MemoryConstants = {
/** Bytes per kilobyte */
BYTES_PER_KB: 1024,
/** Kilobytes per megabyte */
KB_PER_MB: 1024,
};
/**
* DNS detection defaults
*/
exports.DnsConstants = {
/** Default DNS query timeout in milliseconds */
DEFAULT_TIMEOUT_MS: 5000,
/** Max DNS detection attempts per process per rolling minute */
MAX_REQUESTS_PER_MINUTE: 10,
};
//# sourceMappingURL=constants.js.map