mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
20 lines
321 B
TypeScript
20 lines
321 B
TypeScript
// Email address matcher.
|
|
// eslint-disable-next-line no-useless-escape
|
|
const matcher = /.+\@.+\..+/;
|
|
|
|
/**
|
|
* Loosely validate an email address.
|
|
*
|
|
* @param {string} string
|
|
* @return {boolean}
|
|
*/
|
|
function isEmail(value: string): boolean {
|
|
return matcher.test(value);
|
|
}
|
|
|
|
/*
|
|
* Exports.
|
|
*/
|
|
|
|
export default isEmail;
|