isEmail
is simple modiule for deno It helps us to verify the email if it is valid
Usage
a valid emails
import { isEmail } from "https://deno.land/x/isemail/mod.ts";
// Pass the email you want check it as argument
console.log(isEmail('username@domain.com')) // true
console.log(isEmail('user#name@do07main.com')) // false
A valid Emails
Examples:
console.log(isEmail('username@domain.com')) // true
console.log(isEmail('user.name@do-main.com')) // true
console.log(isEmail('user-name@sub.domain.com.dz')) // true
Invalid Emails
Any email containing one of the not allowed characters , it is not valid
Not allowed characters: ! # $ % & ‘ * + – / = ? ^ ` . { | } ~
Examples:
console.log(isEmail('user#name@domain.com')) // false
console.log(isEmail('user.name@do~main.com')) // false
console.log(isEmail('user$name@sub.domain.com.dz')) // false