1.0.6 • Published 2 years ago

check-email-address v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

check-email-address

Tiny library for checking email address whether it's valid or not with support of TypeScript Support in CJS, ESM and React App

Use Case

Installation

npm install check-email-address 

or

yarn add check-email-address

Usage

Common JS

// CJS (Common JS)
const checkEmailAddress = require('check-email-address')

const emailAddr = 'myEmail@mail.com'
const { isValid } = checkEmailAddress(emailAddr)

if(isValid){
    console.log("Email valid")
} else {
    console.log("Email is not valid")
}

ES Modules

// ESM (ES Modules)
import checkEmailAddress from 'check-email-address'

const emailAddr = 'myEmail@mail.com'
const { isValid } = checkEmailAddress(emailAddr)

if(isValid){
    console.log("Email valid")
} else {
    console.log("Email is not valid")
}

React App

// React App (TSX)
import checkEmailAddress from 'check-email-address'

export default function Component(props: any){
    ...
    const { isValid }: { isValid: boolean } = checkEmailAddress(email)
    ...
}
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago