Validate an email => true | false
One straight forward email
validator function that returns a boolean 😍
Install
npm i @ssts/email
Import
import seniorEMAIL from "@ssts/email";
Use
const isEmail: boolean = seniorEMAIL("example@test.com");
Arguments
Returns a boolean
Order | Parameter | Type | Default |
---|
1 | email | string | required |
Examples
import seniorEMAIL from "@ssts/email";
console.log(seniorEMAIL("example@gmail.com"));
console.log(seniorEMAIL("user123@yahoo.com"));
console.log(seniorEMAIL("valid.email@domain.com"));
console.log(seniorEMAIL("contact@mydomain.org"));
console.log(seniorEMAIL("info@business.info"));
console.log(seniorEMAIL(""));
console.log(seniorEMAIL("abc"));
console.log(seniorEMAIL("user@.com"));
console.log(seniorEMAIL("user@@domain.com"));
console.log(seniorEMAIL("&user@email.com"));
console.log(seniorEMAIL("can----t@gmail.com"));
console.log(seniorEMAIL("user@gmail..com"));
Made With Chocolate By Senior Sedo 😎
Be Chocolateful 💙😍
ssts stands for senior-sedo-typescript 💙
So instead of @senior-sedo-typescript/is-email
@ssts/email
for simplicity sake 😍