https://github.com/sefinek/email-validator
Lightweight npm module for email address validation.
https://github.com/sefinek/email-validator
email email-address-validator email-checker email-validator email-verifier email-verify npm-module npm-package validation validator validators
Last synced: 2 months ago
JSON representation
Lightweight npm module for email address validation.
- Host: GitHub
- URL: https://github.com/sefinek/email-validator
- Owner: sefinek
- License: mit
- Created: 2023-12-24T04:28:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T19:16:23.000Z (over 1 year ago)
- Last Synced: 2025-01-27T08:12:30.276Z (about 1 year ago)
- Topics: email, email-address-validator, email-checker, email-validator, email-verifier, email-verify, npm-module, npm-package, validation, validator, validators
- Language: JavaScript
- Homepage: https://sefinek.net/npm/email-validator/demo
- Size: 786 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 📨 Email Address Validator
This lightweight module facilitates precise email address validation, returning a `Boolean` value of `true` or `false`.
## 🟢 » Node.js
### Installation via npm
```bash
npm install @sefinek/email-validator
```
### Installation via yarn
```bash
yarn add @sefinek/email-validator
```
### Example
```js
const emailValidator = require('@sefinek/email-validator');
const TEST_EMAIL = 'contact@sefinek.net';
if (emailValidator(TEST_EMAIL)) {
console.log(`Email ${TEST_EMAIL} is valid.`);
} else {
console.log(`Email ${TEST_EMAIL} is NOT valid!`);
}
```
## 🌍 » Browser
### jsdelivr.net
```
https://cdn.jsdelivr.net/npm/@sefinek/email-validator@2/dist/email-validator.min.js
```
### Example
```html
email-validator
email-validator
const email = 'contact@sefinek.net';
if (emailValidator(email)) {
console.log(`✔️ Email ${email} is valid.`);
} else {
console.log(`❎ Email ${email} is NOT valid!`);
}
```
### Demo
> https://sefinek.net/npm/email-validator/demo
## ⭐ » Thank you
If you find this module helpful, please consider giving the [repository a star](https://github.com/sefinek/email-validator).
For any questions or issues, please create a new [Issue](https://github.com/sefinek/email-validator/issues/new).