@ssts/email
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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"));          // true
console.log(seniorEMAIL("user123@yahoo.com"));          // true
console.log(seniorEMAIL("valid.email@domain.com"));     // true
console.log(seniorEMAIL("contact@mydomain.org"));       // true
console.log(seniorEMAIL("info@business.info"));         // true

console.log(seniorEMAIL(""));                           // false
console.log(seniorEMAIL("abc"));                        // false
console.log(seniorEMAIL("user@.com"));                  // false
console.log(seniorEMAIL("user@@domain.com"));           // false
console.log(seniorEMAIL("&user@email.com"));            // false
console.log(seniorEMAIL("can----t@gmail.com"));         // false
console.log(seniorEMAIL("user@gmail..com"));            // false





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 😍






Package Sidebar

Install

npm i @ssts/email

Weekly Downloads

7

Version

0.0.4

License

MIT

Unpacked Size

5.27 kB

Total Files

7

Last publish

Collaborators

  • seniorsedo