UNPKG
@amxdev/validate-email
Version:
latest (1.0.0)
1.0.0
Check if a string is a valid email address.
@amxdev/validate-email
/
src
/
index.ts
3 lines
•
108 B
text/typescript
View Raw
1
2
3
export
function
validateEmail
(
email
:
string
):
boolean
{
return
/^[^\s@]+@[^\s@]+\.[^\s@]+$/
.
test
(email); }