UNPKG

typia

Version:

Superfast runtime validators with only one line

6 lines (4 loc) 279 B
const _isFormatEmail = (str) => PATTERN.test(str); const PATTERN = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i; export { _isFormatEmail }; //# sourceMappingURL=_isFormatEmail.mjs.map