UNPKG

@hiki9/rich-domain

Version:

Rich Domain is a library that provides a set of tools to help you build complex business logic in NodeJS using Domain Driven Design principles.

12 lines 456 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isEmail = void 0; // Email address matcher. var matcher = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; function isEmail(string) { if (string.length > 320) return false; return matcher.test(string); } exports.isEmail = isEmail; //# sourceMappingURL=is-email.js.map