UNPKG

@sebgroup/frontend-tools

Version:
16 lines (12 loc) 511 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * Check if an email is valid * @param {string} value email * @returns {boolean} true if email is valid, false if email is not valid */ function isEmail(value) { return new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(value); } exports.isEmail = isEmail; //# sourceMappingURL=isEmail.js.map