GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BaseMax/email-validator-nodejs: This is a simple email validator for NodeJS that can match all emails in a string, check if a string has an email address, or check if a string includes a specific email address. You can use this module to validate emails in your NodeJS projects.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
email-validator.js
email-validator.js
 
 
example.js
example.js
 
 
package.json
package.json
 
 

Repository files navigation

email-validator-nodejs

This is a simple email validator for NodeJS that can match all emails in a string, check if a string has an email address, or check if a string includes a specific email address. You can use this module to validate emails in your NodeJS projects.

Features

  • Match all emails in a string
  • Check a specific email address in a string
  • Check if a string has at least one email address
  • Check if a string match only one email address without any other characters or white spaces

Example

Import the module:

const email_validator = require("./email-validator");

Then match all emails in a string:

console.log(email_validator.match("hi there, here is my email address: [email protected] please email me otherwise i will contact [email protected]... or at least to [email protected] or [email protected]"));

Or check if a string has an email address:

console.log(email_validator.has("hi there, here is my email address: [email protected] please email me otherwise i will contact [email protected]... or at least to [email protected] or [email protected]"));
console.log(email_validator.has("hey please message me to [email protected]"));
console.log(email_validator.has("!!!!"));

Or check if a string only match an email address without any other characters:

console.log(email_validator.exact("hi there, here is my email address: [email protected] please email me otherwise i will contact [email protected]... or at least to [email protected] or [email protected]"));
console.log(email_validator.exact("hey please message me to [email protected]"));
console.log(email_validator.exact("[email protected]"));
console.log(email_validator.exact("!!!!"));

Or check if a string includes a specific email address:

console.log(email_validator.includes("hey please message me to [email protected]", "[email protected]"));
console.log(email_validator.includes("hey please message me to [email protected]", "[email protected]"));

Copyright 2023, Max Base

About

This is a simple email validator for NodeJS that can match all emails in a string, check if a string has an email address, or check if a string includes a specific email address. You can use this module to validate emails in your NodeJS projects.

Topics

emailemail-validateemail-validatorjavascriptjavascript-regexjsjs-regexregexregex-javascriptregex-jsregular-expressionregular-expression-javascriptregular-expression-jsregular-expressionsvalidator

Resources

Readme
GPL-3.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.